Click Timers and the OSKit

Leigh Stoller stoller at fast.cs.utah.edu
Tue Jan 11 14:42:54 EST 2000


Hi. I've been doing some more work on the OSKit version of Click. I just
wanted to run something by you folks to see what you think. At present, we
have made a modest number of changes to Click to allow multiple router
graphs to be instantiated, where each router graph runs in its own thread
context. For an individual router graph, both the driver loop and packet
delivery happen in thread context, and reentrancy is controlled (well,
prevented) through the use of a mutex and condition variable pair. That is,
packet delivery cannot happen while the driver loop is operational, and the
driver loop cannot run while a packet is being delivered.

This more or less works. It breaks down in a few places, most of which are
easy to deal with, or will be when I get around to it; not many uses of
global static data, which is nice. One spot thats a little bit more
work (not solvable with a few simple ifdefs) is the Timer implementation,
which uses a global timer list to hold the ordered list of events. Thats
not going to work in our model.

I was wondering what you think of changing the Timer abstraction a bit. I
would like to add a "Clock" object, to which Timers are scheduled. Each
router would have its own Clock object, accessible via the Element. That
way, Timers would be specific to the router graph in which the Element is
operating.

The changes to Click are small; about 1/2 a dozen elements use Timers at
present. However, its a big enough change in approach that I figured I
would check to see if you would be willing to buy it back when its done.

Feel free to make suggestions or comments. I'm not the world's most
experienced C++ programmer, so there might be better approaches you can
suggest.

Thanks
Lbs

---------------------------------------------------------------------------
Leigh B. Stoller                     Computer Science - Flux Research Group
stoller at cs.utah.edu                  University of Utah
http://www.cs.utah.edu/~stoller      Salt Lake City, Utah 84112
Voice: (541) 758-6252                FAX: (801) 585-3743
---------------------------------------------------------------------------



More information about the click mailing list