Review of Scheduler Activations

From: Nathan Dire (ndire_at_cs.washington.edu)
Date: Sun Jan 25 2004 - 18:55:39 PST

  • Next message: ahemavathy: "Scheduler Activations Review"

    In "Scheduler Activations: Effective Kernel Support for the User-Level
    Management of Parallelism," Anderson, et al address the problem of
    threading support in modern operating systems. Threads attempt to
    exploit program-level parallelism while allowing for easy communication
    between execution contexts. With the increasing availability of
    multiprocessor architectures, it becomes more important to provide good
    support for threading.

    The approaches to thread support taken by most modern systems can be
    characterized as user-managed threading or kernel-managed threading.
    With user threads, all the user threads run using one kernel thread, and
    the scheduling of threads is managed without kernel intervention. This
    has the advantage of being very fast and efficient with kernel
    resources. The downside is that when one thread is blocked in a
    syscall, all threads in that process space are blocked. With kernel
    threads, each user thread has a kernel thread. The advantage of this
    approach is that each thread is independently scheduled by the kernel,
    but additional overhead consume precious kernel resources and lacks the
    performance of user threads.

    The authors present a solution to this problem which combines both
    approaches in the form of scheduler activations, an extended user-kernel
    interface that exposes more scheduling capability to the application.
    The user-level thread scheduler is given 'virtual processors' on which
    to execute threads. Scheduler activations provide the mechanism, having
    a context in both kernel and user space. The difference between
    scheduler activations and kernel threads is that scheduler activations
    don't stay blocked, instead the user thread scheduler is notified via an
    upcall, and removes the blocked thread from the activation, allowing it
    to schedule an runnable thread. Thus, only as many activations as can
    be used by the threaded application are employed at any time, saving
    kernel resources as compared to the one-to-one approach.

    The authors evaluate this approach by modifying Topaz, the native
    operating system for the DEC SRC Firefly multiprocessor workstation, and
    FastThreads, a user-level thread package. With a relatively small
    development effort and little optimization, the authors are able to get
    close to the performance of the pure user threading of FastThreads for
    the thread management intensive Null Fork and Signal-Wait tests. For
    the N-body application, the modified FastThreads implementation is shown
    to be superior in all tests, and shows an impressive gain in the
    multiprogrammed version.

    I don't know the precise historical context of this paper, but it
    appears to be the foundation for the many-to-many threading approach
    represented by Light-Weight Processes in Solaris. I know that Scheduler
    Activations are the basis for FreeBSD's next generation of threading
    support, called Kernel Scheduler Entities. However, the latest movement
    seems to favor making kernel threads more efficient; now that Sun is
    favoring one-to-one threading, it will be the model for Windows, Linux,
    and Solaris, which make up the vast majority of operating systems in use
    today.


  • Next message: ahemavathy: "Scheduler Activations Review"

    This archive was generated by hypermail 2.1.6 : Sun Jan 25 2004 - 18:55:41 PST