Notes on Exokernel

We read the first, most idealistic exokernel paper [1]. Also of interest are the followon paper on an x86 exokernel [2], which includes a discussion of the XN system for securely multiplexing the disk, and a later journal paper [3], whose Section 8 (Discussion) has some really interesting observations.

The big exokernel questions are: Is the exokernel architecture a viable alternative for operating systems design? And whether or not the architecture is viable, which of the mechanisms used to build an exokernel OS are suitable for other contexts? My answer to the first question is No, outside of limited research contexts.

The exokernel approach

Convincing architectural arguments and mechanisms

Less convincing

Discussion

Good performance may not be the hard part of OS design. A usable interface that also gets good performance is harder. Many of the interfaces in this paper and its follow-ups are not usable, except in the sense that they can be replaced.

Microbenchmarks vs. macrobenchmarks! The first exokernel paper [1] is all about microbenchmarks: the performance of system calls, the performance of IPC. (So was Liedtke’s L3 paper.) The second exokernel paper [2] points out that microbenchmarks don’t matter for good performance. (“The main benefit of an exokernel is not that it makes primitive operations efficient, but that it gives applications control over expensive operations such as I/O.” [p13, 2]) Some of the cool systems that motivated the exokernel work are quite microbenchmark-focused; for example, Massalin and Pu’s Synthesis kernel featured optimizations that greatly improved the performance of reading or writing one byte at a time. In the real world if one-byte reads or writes are causing a performance problem, applications will use buffered I/O.

Some researchers believe that virtual machines are exokernels, and that the success of virtual machines therefore demonstrates the success of the exokernel idea. This has some merit: certainly exokernels were influential, and influential projects impact people’s thinking in unexpected ways. However, whether or not VMMs are exokernels, they certainly are low-performance relative to other kernel designs running on bare hardware.

In what ways are exokernels and usability in opposition? An exokernel designer would argue that cooperating library operating systems can provide just as friendly and forgiving a programming environment as a monolithic kernel. I would argue with this. First, libOSes share an address space with their applications, making them vulnerable to corruption from memory errors. If libOSes cooperate using shared memory, one buggy application can threaten an entire libOS ecosystem. (LibOSes can be programmed defensively, but this is tedious and unfriendly; sharing via IPC can be expensive.) Second, the exokernel design expects that some users want to program their own libOSes, or at least parts of their own libOSes; it is not clear how new libOSes would cooperate with existing ones, and I don’t know of any good examples.

Analogies

Notes


  1. Dawson R. Engler, M. Frans Kaashoek, and James O’Toole Jr., “Exokernel: An Operating Systems Architectrue for Application-Level Resource Management”, in Proc. 15th SOSP, Dec. 1995, pp251–266. (ACM Digital Library)

  2. M. Frans Kaashoek, Dawson R. Engler, Gregory R. Ganger, Héctor M. Briceño, Russell Hunt, David Mazières, Thomas Pinckney, Robert Grimm, John Jannotti, and Kenneth Mackenzie, “Application Performance and Flexibility on Exokernel Systems”, Proc. 17th SOSP, Oct. 1997, pp.52–65 (ACM Digital Library)

  3. Gregory R. Ganger, Dawson R. Engler, M. Frans Kaashoek, Héctor M. Briceño, Russell Hunt, Thomas Pinckney, “Fast and flexible application-level networking on exokernel systems”, ACM TOCS 20(1), Feb. 2002, pp49–83. (ACM Digital Library)