A Toolkit for Specializing Production Operating System Code

Specialization has been recognized as a powerful technique for optimizing operating systems. However, specialization has not been broadly applied beyond the research community because the current techniques, based on manual specialization, are time-consuming and error-prone. This paper describes a specialization toolkit that should help broaden the applicability of specializing operating systems by assisting in the automatic generation of specialized code, and {\em guarding} the specialized code to ensure the specialized system continues to be correct. We demonstrate the effectiveness of the toolkit by describing experiences we have had applying it in real, production environments. We report on our experiences with applying the tools to three disparate portions of operating systems: signal delivery, memory allocation and RPC. We describe how we used the toolkit to specialize these components, and present the resulting performance improvements. We conclude that a toolkit-based approach to specialization can work, and is an effective operating system optimization technique.

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

[2]  Ken Thompson,et al.  Plan 9 from Bell Labs , 1995 .

[3]  Calton Pu,et al.  The Synthesis Kernel , 1988, Comput. Syst..

[4]  Brian N. Bershad,et al.  Dynamic binding for an extensible system , 1996, OSDI '96.

[5]  Frederick W. Clegg,et al.  The hp-ux operating system on hp precision architecture computers , 1966 .

[6]  Mike Hibler,et al.  Microkernels meet recursive virtual machines , 1996, OSDI '96.

[7]  James G. Mitchell,et al.  JavaOS: Back to the Future (Abstract). , 1996, OSDI 1996.

[8]  Peter Sestoft,et al.  Partial evaluation and automatic program generation , 1993, Prentice Hall international series in computer science.

[9]  Kiem-Phong Vo,et al.  Vmalloc: A General and Efficient Memory Allocator , 1996, Softw. Pract. Exp..

[10]  Calton Pu,et al.  A Distributed Real-Time MPEG Video Audio Player , 1995, NOSSDAV.

[11]  Calton Pu,et al.  Fast concurrent dynamic linking for an adaptive operating system , 1996, Proceedings of International Conference on Configurable Distributed Systems.

[12]  Brian N. Bershad,et al.  Extensibility safety and performance in the SPIN operating system , 1995, SOSP.

[13]  D. B. Orr,et al.  OMOS-an object server for program execution , 1992, [1992] Proceedings of the Second International Workshop on Object Orientation in Operating Systems.

[14]  William Pugh,et al.  Skip Lists: A Probabilistic Alternative to Balanced Trees , 1989, WADS.

[15]  Bryan Ford,et al.  CPU inheritance scheduling , 1996, OSDI '96.

[16]  Dirk Grunwald,et al.  Customalloc: Efficient synthesized memory allocators , 1993, Softw. Pract. Exp..

[17]  Dirk Grunwald,et al.  Improving the cache locality of memory allocation , 1993, PLDI '93.

[18]  Jeff Bonwick,et al.  The Slab Allocator: An Object-Caching Kernel Memory Allocator , 1994, USENIX Summer.

[19]  Dawson R. Engler,et al.  C: a language for high-level, efficient, and machine-independent dynamic code generation , 1995, POPL '96.

[20]  Calton Pu,et al.  Specialization classes: an object framework for specialization , 1996, Proceedings of the Fifth International Workshop on Object-Orientation in Operation Systems.

[21]  Robert O'Callahan,et al.  Lackwit: A Program Understanding Tool Based on Type Inference , 1997, Proceedings of the (19th) International Conference on Software Engineering.

[22]  Steven W. K. Tjiang,et al.  SUIF: an infrastructure for research on parallelizing and optimizing compilers , 1994, SIGP.

[23]  Kiem-Phong Vo Vmalloc: A General and Efficient Memory Allocator , 1996 .

[24]  Paul R. Wilson,et al.  Dynamic Storage Allocation: A Survey and Critical Review , 1995, IWMM.

[25]  Olivier Danvy,et al.  Tutorial notes on partial evaluation , 1993, POPL '93.

[26]  James G. Mitchell JavaOS: back to the future , 1996, OSDI '96.

[27]  Charles Consel,et al.  A general approach for run-time specialization and its application to C , 1996, POPL '96.

[28]  Charles Consel,et al.  Safe Operating System Specialization: the RPC Case Study , 1996 .

[29]  Dawson R. Engler,et al.  Exokernel: an operating system architecture for application-level resource management , 1995, SOSP.

[30]  Jr. Avadis Tevanian Architecture independent virtual memory management for parallel and distributed environments: the mach approach , 1987 .

[31]  Benjamin G. Zorn,et al.  Using lifetime predictors to improve memory allocation performance , 1993, PLDI '93.

[32]  Lars Ole Andersen Binding-time analysis and the taming of C pointers , 1993, PEPM '93.