Review: Anderson et al., Scheduler Activations

From: Ian King (iking_at_killthewabbit.org)
Date: Sun Jan 25 2004 - 22:25:53 PST

  • Next message: Song Xue: "Review of "Scheduler Activations: Effective Kernel Support for the User-Level Management of Parallelism""

    This paper discusses an approach to multithreading in a multiprocessor
    environment. The authors argue that current approaches, based either on kernel
    threads, user-space threads or a collaboration between the two, are inefficient,
    and present a methodology for scheduling multiple user-space threads on multiple
    processors through the mechanism of scheduler activations. They implement this
    on a six-processor shared-memory computer and produce statistics that validate
    their arguments.

    After grasping the principles being set forth, the premises seemed quite clear.
    Kernel threads incur significant performance penalties because of the crossing
    of the protection boundary into kernel space. User-mode threads are much more
    lightweight, but user-mode applications should be ignorant of underlying
    multiprocessor infrastructure (e.g. which processor am I running on?). The
    approach of scheduling one thread per processor, which then in turn schedule a
    subset of the user-mode threads, is initially attractive, but actually presents
    several problems. The reason is clear: here are two distinct zones of
    authority, each with different goals (as expressed in scheduling policies) and
    inadequate communication mechanisms to allow them to meaningfully synchronize.
    The result is idle processors while threads exist to do work, and blocked
    threads that could potentially be rescheduled to another processor.

    The solution offered by the authors, scheduler activations, is a
    state-preservation and communication mechanism that offers just those features
    of kernel threads needed to support user threads, plus the synchronization
    semantics, without the generalizations of true kernel threads that complicate
    the story. One could consider it a "passive" mechanism paralleling that of
    processor-scheduling semantics as discussed in the 1989 Anderson/Lazowska/Levy
    paper on thread management alternatives, combined with a commitment to user-mode
    ownership similar to an exokernel; the scheduler activation allows the user-mode
    thread scheduler to schedule threads on a given processor, and semantics are
    retained that allow for revocation.

    Performance on a multiprocessor seems to justify the reasoning, according to the
    metrics offered by the authors. This was a well-considered experimental set,
    offering a comparison between pure kernel threads, kernel threads with user-mode
    threads and the authors' proposed mechanism. It is intriguing that they
    consider the use of scheduler activations as a general purpose mechanism that
    could also be implemented on a uniprocessor; their findings are that their
    implementation is not competitive in performance, but they question whether this
    is an implementation issue. The difference between Topaz threads written in
    tuned assembler and the scheduler activation code written in Modula 2 is likely
    to be significant, and it would indeed be interesting to measure performance
    with a native implementation. This would provide complete portability between
    uniprocessor and multiprocessor machines, as well as support the use of
    multiprocessor architectures for enhanced reliability (i.e. failover), not just
    performance.


  • Next message: Song Xue: "Review of "Scheduler Activations: Effective Kernel Support for the User-Level Management of Parallelism""

    This archive was generated by hypermail 2.1.6 : Sun Jan 25 2004 - 22:51:00 PST