
The Exokernel Operating System Architecture by Dawson R. Engler Submitted to the Department of Electrical Engineering and Computer Science in partial fulfillment of the requirements for the degree of Doctor of Philosophy in Computer Science and Engineering at the MASSACHUSETTS INSTITUTE OF TECHNOLOGY December 1998 c Massachusetts Institute of Technology 1998. All rights reserved. Author ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Department of Electrical Engineering and Computer Science December 11, 1998 Certified by ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: M. Frans Kaashoek Associate Professor Thesis Supervisor Accepted by :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Arthur C. Smith Chairman, Departmental Committee on Graduate Students The Exokernel Operating System Architecture by Dawson R. Engler Submitted to the Department of Electrical Engineering and Computer Science on December 11, 1998, in partial fulfillment of the requirements for the degree of Doctor of Philosophy in Computer Science and Engineering Abstract On traditional operating systems only trusted software such as privileged servers or the kernel can manage resources. This thesis proposes a new approach, the exokernel architecture, which makes resource man- agement unprivileged but safe by separating management from protection: an exokernel protects resources, while untrusted application-level software manages them. As a result, in an exokernel system, untrusted software (e.g., library operating systems) can implement abstractions such as virtual memory, file systems, and networking. The main thrusts of this thesis are: (1) how to build an exokernel system; (2) whether it is possible to build a real one; and (3) whether doing so is a good idea. Our results, drawn from two exokernel systems [25, 48], show that the approach yields dramatic benefits. For example, Xok, an exokernel, runs a web server an order of magnitude faster than the closest equivalent on the same hardware, common unaltered Unix applications up to three times faster, and improves global system performance up to a factor of five. The thesis also discusses some of the new techniques we have used to remove the overhead of protection. The most unusual technique, untrusted deterministic functions, enables an exokernel to verify that applications correctly track the resources they own, eliminating the need for it to do so. Additionally, the thesis reflects on the subtle issues in using downloaded code for extensibility and the sometimes painful lessons learned in building three exokernel-based systems. Thesis Supervisor: M. Frans Kaashoek Title: Associate Professor “But I don' t want to go among mad people,” Alice remarked. “Oh, you can' t help that,” said the Cat: “we're all mad here. I' m mad, you're mad.” “How do you know I' m mad?” said Alice. “You must be,” said the Cat, “or you wouldn' t have come here.” - Lewis Carroll (1832-1898), Alice In Wonderland 3 Acknowledgments The exokernel project has been the work of many people. The basic principles of Chapter 2 and the Aegis exokernel come from a paper [25] written jointly with Frans Kaashoek and James O' Toole (which descended from my master's thesis, done under Kaashoek, with ideas initiated by [26, 27]). In contrast to Aegis, Xok has been written largely by others. Dave Mazieres implemented the initial Xok kernel. Thomas Pinckney Russell Hunt, Greg Ganger, Frans Kaashoek, and Hector Briceno further developed Xok and made ExOS into a real Unix system. Greg Ganger designed and implemented C-FFS [37] and the Cheetah web server (based in part on [49]), the two linchpins of most of our application performance numbers. Ganger and Kaashoek oversaw countless modifications to the entire system. Eddie Kohler made an enormous contribution in our write up of these results. This work, described in [48], forms the basis for Chapter 5, and as a less primary source for Chapters 2— 4. Grateful thanks to Butler Lampson and John Guttag for serving as thesis readers when both had much more pressing claims on their time. Greg Andrews first introduced me to research, fundamentally changing my life. The effects of his intervention still reverberate. Frans has been an unbelievable advisor. I am extravagently lucky to have worked with him. He guides with an amazing skill, without seeming to do anything at all. His technical excellence constantly pushed me to see and think more deeply. His fundamental goodness has made me much better than I was. Thanks to: Dave for volume, in all its forms; John for rescues and (laptop) wizardry; Greg for an example; Tom and Rusty for going onward; Max for science and sense; aNd EdDie TWo, for bEiNg yOu. And special thanks to all for enduring years of being on the wrong end of vapid bromides and vacuous optimism. Contents 1 Introduction 13 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1.1 Relation to other OS structures : 15 : : : : : : : : : : : : : : : : : : : : : : : : 1.1.1 Recent extensible operating systems : 17 : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1.2 The focusing questions of this thesis : 18 : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1.2.1 How to build an exokernel? : 19 : : : : : : : : : : : : : : : : : : : : : : 1.2.2 Can you build a real exokernel system? : 21 : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1.2.3 Are exokernels a good idea? : 21 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1.3 Concerns : 23 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1.4 Summary : 25 2 How to build an exokernel: principles 26 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2.1 Exokernel principles : 27 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2.1.1 Policy : 29 : : : : : : : : : : : : : : : : : : : : : : : : : : 2.2 Kernel support for protected abstractions : 29 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2.3 Implementation-defined Decisions : 32 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2.4 Visible Resource Revocation : 33 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2.5 Secure Bindings : 35 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2.6 Methodology Discussion : 36 3 Practice: Applying exokernel principles 38 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 3.0.1 Xok overview : 38 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 3.0.2 Aegis overview : 39 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 3.1 Multiplexing Physical Memory : 39 : : : : : : : : : : : : : : : : : : : : : : : : : 3.1.1 Aegis: application virtual memory : 40 : : : : : : : : : : : : : : : : : : : : : : : : 3.1.2 Xok: hardware-defined page tables : 41 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 3.2 Multiplexing the Network : 42 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 3.3 Multiplexing the CPU : 43 : : : : : : : : : : : : : : : : : : : : : : : : : 3.3.1 Aegis and Xok CPU multiplexing : 43 6 : : : : : : : : : : : : : : : : : : : : : : : : : : : 3.3.2 Aegis Processor Environments : 45 : : : : : : : : : : : : : : : : : : : : : : : 3.3.3 Implementing Unix Processes on Xok : 46 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 3.4 Exposing Machine Events : 46 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 3.4.1 Aegis Exceptions : 46 : : : : : : : : : : : : : : : : : : : : : : : : : 3.4.2 Aegis Protected Control Transfers : 47 : : : : : : : : : : : : : : : : : : : : : : : : : : 3.4.3 Implementing Unix IPC on Xok : 48 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 3.5 Discussion : 48 4 The Hardest Multiplexing Problem: Disk 50 : : : : : : : : : : : : : : : : : : : : : : : : : : 4.1 Efficient, fine-grained disk multiplexing : 51 : : : : : : : : : : : : : : : : : : : : : : : : : : : 4.1.1 Efficiency: State Partitioning : 55 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 4.2 Overview of XN : 58 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 4.3 XN: Problem and history : 59 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 4.4 XN: Design and implementation : 60 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 4.5 XN usage : 63 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 4.6 Crash Recovery Issues : 64 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 4.7 C-FFS: a library file system : 65 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 4.8 Discussion : 66 5 Performance of exokernel systems 68 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 5.1 Xok Experimental Environment : 69 : : : : : : : : : : : : : : : : : : : : : : 5.2 Performance of common, unaltered applications : 70 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 5.3 The cost of exokernel flexibility : 71 : : : : : : : : : : : : : : : : : : : : : : 5.3.1 The cost of OS abstractions in libraries : 71 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 5.3.2 The cost of protection : 71 : : : : : : : : : : : : : : : : : : : : : : : : : : : : 5.4 Aggressive application performance : 72 : : : : : : : : : : : : : : : : : : : : : 5.4.1 XCP: a “zero-touch” file copying program : 72 : : : : : : : : : :
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages120 Page
-
File Size-