Using threads in interactive systems: a case study

We describe the results of examining two large research and commercial systems for the ways that they use threads. We used three methods: analysis of macroscopic thread statistics, analysis the microsecond spacing between thread events, and reading the implementation code. We identify ten different paradigms of thread usage: defer work, general pumps, slack processes, sleepers, one-shots, deadlock avoidance, rejuvenation, serializers, encapsulated fork and exploiting parallelism. While some, like defer work, are well known, others have not been previously described. Most of the paradigms cause few problems for programmers and help keep the resulting system implementation understandable. The slack process paradigm is both particularly effective in improving system performance and particularly difficult to make work well. We observe that thread priorities are difficult to use and may interfere in unanticipated ways with other thread primitives and paradigms. Finally, we glean from the practices in this code several possible future research topics in the area of thread abstractions.

[1]  Richard L. Sites,et al.  Alpha AXP architecture , 1993, CACM.

[2]  Brian N. Bershad,et al.  Using continuations to implement thread management and communication in operating systems , 1991, SOSP '91.

[3]  Georges G. Grinstein,et al.  The X window system , 1988, SIGGRAPH '88.

[4]  Maureen C. Stone,et al.  An introduction to Gargoyle: an interactive illustration tool , 1988 .

[5]  James Gettys,et al.  X window system (3rd ed.): the complete reference to Xlib, X Protocol, ICCCM, XLFD , 1990 .

[6]  Carl Schmidtmann,et al.  Design and Implementation of a Multi-Threaded Xlib , 1993, USENIX Winter.

[7]  Eric A. Bier,et al.  EmbeddedButtons: supporting buttons in documents , 1992, TOIS.

[8]  Ashok Singhal,et al.  The next-generation SPARC multiprocessing system architecture , 1993, Digest of Papers. Compcon Spring.

[9]  Richard J. Beach,et al.  A structural view of the Cedar programming environment , 1986, TOPL.

[10]  Helen Custer,et al.  Inside Windows NT , 1992 .

[11]  Steve R. Kleiman,et al.  SunOS Multi-thread Architecture , 1991, USENIX Winter.

[12]  Lui Sha,et al.  Real-time scheduling theory and Ada , 1990, Computer.

[13]  George Eckel Inside Windows NT , 1993 .

[14]  Eric Harslem,et al.  Designing the STAR User Interface , 1987, ECICS.

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

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

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