Scheduler Activations: Effective Kernel Support for the User-Level Management of Parallelism

Anderson, et. Al

 

Threads either built at user-level or kernel-level.

 

Advantages of kernel-threads:

 

Problems with kernel-threads:

 

Advantages of user-level threads:

 

Problems with user-level (“green”) threads:

 

Current approaches to user-level thread problems in Mach and Topaz are avoided by implementing user-level threads on top of kernel threads.  Of course, by doing so, the thread implementations inherit all of the problems that come along with kernel-level threads.

 

 

One bad idea to solve these problems is to have the application make calls to the kernel to state preferences about how to schedule its threads.  This will result in bad performance due to the overhead of crossing into the kernel each time to make these calls.  (Or, I guess it would really depend upon how often these calls would need to be made, but this still sounds like a bad idea.)

 

Scheduler Activations attempts to provide the best of both kernel and user-level threads, while avoiding the disadvantages of both. 

 

 

Explain this quote to me: “The application programmer sees no difference, except for performance, from programming directly with kernel threads.”  Hmm… I thought one of the benefits is that the application programmer could provide his/her own thread scheduler, and that the application programmer would indeed need to specify how much parallelism (i.e, how many physical processor sthe application wants) in order to really gain all the advantages described for scheduler activations.

 

Scheduler Activation Upcalls

1)      Add this processor

2)      Processor has been preempted

3)      Scheduler activation has blocked

4)      Scheduler activation has unblocked

 

Application “downcalls”

1)      Add more processors

2)      This processor is idle

 

 

 

 

Implementation

 

Scheduler Activations implements on DEC SRC Firefly multiprocessor.  FastThreads user-level thread library and Topaz kernel-level thread library modified to implement scheduler activations.

 

If a user-level thread is in a critical section (and holds locks) when in becomes blocked or preempted, the thread is continued temporarily until it exists the critical section.  This technique prevents deadlock.  (This is a deadlock recovery strategy.  The authors considered a deadlock prevention strategy, but it was too expensive / would cause performance problems due to requiring the pinning down of pages while in a critical section, etc.)

 

Would be useful to compare/contrast this work with all of the “application-controlled virtual memory management” papers.  Scheduler Activations is sort of like “application-controlled thread management.”

 

Miscellaneous Interesting Points

 

So this is funny… in the Java community, “native” threads instead of “green” threads were welcomed (or perhaps marketed) as a big plus.  I guess no one has brought up scheduler activations! J

 

I noted that there were a lot (>250) citations to this scheduler activations paper in citeseer.  Has this become commercial yet?