First-class user-level threads

It is often desirable, for reasons of clarity, portability, and efficiency, to write parallel programs in which the number of processes is independent of the number of available processors. Several modern operating systems support more than one process in an address space, but the overhead of creating and synchronizing kernel processes can be high. Many runtime environments implement lightweight processes (threads) in user space, but this approach usually results in second-class status for threads, making it difficult or impossible to perform scheduling operations at appropriate times (e.g. when the current thread blocks in the kernel). In addition, a lack of common assumptions may also make it difficult for parallel programs or library routines that use dissimilar thread packages to communicate with each other, or to synchronize access to shared data.We describe a set of kernel mechanisms and conventions designed to accord first-class status to user-level threads, allowing them to be used in any reasonable way that traditional kernel-provided processes can be used, while leaving the details of their implementation to user-level code. The key features of our approach are (1) shared memory for asynchronous communication between the kernel and the user, (2) software interrupts for events that might require action on the part of a user-level scheduler, and (3) a scheduler interface convention that facilitates interactions in user space between dissimilar kinds of threads. We have incorporated these mechanisms in the Psyche parallel operating system, and have used them to implement several different kinds of user-level threads. We argue for our approach in terms of both flexibility and performance.

[1]  Per Brinch Hansen,et al.  Distributed processes: a concurrent programming concept , 1978, CACM.

[2]  Butler W. Lampson,et al.  Experience with processes and monitors in Mesa , 1980, CACM.

[3]  Robert H. Halstead,et al.  MULTILISP: a language for concurrent symbolic computation , 1985, TOPL.

[4]  William J. Bolosky,et al.  Mach: A New Kernel Foundation for UNIX Development , 1986, USENIX Summer.

[5]  Lawrence C. Stewart,et al.  Firefly: a multiprocessor workstation , 1987, IEEE Trans. Computers.

[6]  Brian N. Bershad,et al.  An Open Environment for Building Parallel Programming Systems , 1988, PPOPP/PPEALS.

[7]  Armando P. Stettner The design and implementation of the 4.3BSD UNIX operating system , 1988 .

[8]  Michael L. Scott,et al.  Design Rationale for Psyche a General-Purpose Multiprocessor Operating System , 1988, ICPP.

[9]  Alessandro Forin,et al.  Multilanguage Parallel Programming of Heterogeneous Machines , 1988, IEEE Trans. Computers.

[10]  Robert H. Thomas,et al.  The Uniform System: An approach to runtime support for large scale shared memory parallel processors , 1988, ICPP.

[11]  Brian N. Bershad,et al.  An Open Environment for Building Parallel Programming Systems , 1988, PPOPP/PPEALS.

[12]  Carl H. Hauser,et al.  The portable common runtime approach to interoperability , 1989, SOSP '89.

[13]  Michael L. Scott,et al.  Evolution of an Operating System for Large-Scale Shared-Memory Multiprocessors , 1989 .

[14]  Anoop Gupta,et al.  Process control and scheduling issues for multiprogrammed shared-memory multiprocessors , 1989, SOSP '89.

[15]  Michael L. Scott,et al.  Multi-model parallel programming in psyche , 1990, PPOPP '90.

[16]  David L. Black Scheduling support for concurrency and parallelism in the Mach operating system , 1990, Computer.

[17]  Mary K. Vernon,et al.  Issues in multiprogrammed multiprocessor scheduling , 1990 .

[18]  Michael L. Scott The Lynx Distributed Programming Language: Motivation, Design and Experience , 1991, Comput. Lang..

[19]  Evangelos P. Markatos,et al.  Multiprogramming on multiprocessors , 1991, Proceedings of the Third IEEE Symposium on Parallel and Distributed Processing.

[20]  Evangelos P. Markatos,et al.  The effects of multiprogramming on barrier synchronization , 1991, Proceedings of the Third IEEE Symposium on Parallel and Distributed Processing.

[21]  Edward D. Lazowska,et al.  The Effect of Scheduling Discipline on Spin Overhead in Shared Memory Parallel Systems , 1991, IEEE Trans. Parallel Distributed Syst..

[22]  Brian N. Bershad,et al.  Scheduler activations: effective kernel support for the user-level management of parallelism , 1991, TOCS.

[23]  Michael L. Scott,et al.  The Rochester checkers player: multimodel parallel programming for animate vision , 1992, Computer.

[24]  Brian D. Marsh,et al.  Multi-Model Parallel Programming , 1992 .

[25]  Raj Vaswani,et al.  A dynamic processor allocation policy for multiprogrammed shared-memory multiprocessors , 1993, TOCS.