Microkernel Operating System Architecture and Mach (1992)

A microkernel is a very minimal, very low-level piece of code that interfaces with hardware to implement the functionality needed for an operating system. Operating systems implemented using a microkernel architecture, rather than a monolithic kernel architecture, implement most of the operating system in user space on top of the microkernel. This architecture affords many advantages including:

This paper describes various ways in which operating systems can be implemented on top of the Mach microkernel. Mach's key features include:

Many different operating systems can be built on top of Mach. It's ideal that applications built for these operating systems can continue to run unmodified even when the underlying OS is implemented on top of Mach. A key part of this virtualization is something called an emulation library. An emulation library is a piece of code inserted into an application's address space. When a program issues system call, Mach immediately redirects control flow to the emulation library to process it. The emulation library can then handle the system call by, for example, issuing an RPC to an operating system server.

Operating systems built on Mach can be architected in one of three ways:

  1. The entire operating system can be baked into the emulation library.
  2. The operating system can be shoved into a single multithreaded Mach task. This architecture can be very memory efficient, and is easy to implement since the guest operating system can be ported with very little code modification.
  3. The operating system can be decomposed into a larger number of smaller processes that communicate with one another using IPC. This architecture encourages modularity, and allows certain operating system components to be reused between operating systems. This approach can lead to inefficiency, especially if IPC is not lighting fast!