22C:116, Lecture Notes, Dec. 4, 1995

Douglas W. Jones
University of Iowa Department of Computer Science

  1. Mach

    Mach was designed at Carnegie Mellon University with the specific goal of producing a distributed foundation on which UNIX systems could be implemented. The goal of providing absolute compatability with UNIX forced some compromizes in the design of this system, but nonetheless, it incorporates some useful ideas.

    Mach is based on a "microkernel", a term that is perhaps a misnomer. As originally proposed, kernels were supposed to be small, in the way that Mach is. The developers of UNIX, however, took over this term and applied it to a fairly large lump -- the UNIX kernel, forcing more recent developers to emphasize that their kernels were, quite properly, small.

    The Mach kernel provides process, thread, memory object, communications port and message management. As with Amoeba and other modern kernel-based systems, it does not include file systems or other high-level abstractions.

  2. Mach Processes

    Each Mach process is made up of a virtual address space, a collection of threads, and a collection of communications ports. Among the ports a process has are a few special ones. The bootstrap port is used to start a process, sending it messages containing the other ports it needs to know about. The exception port is used for error handling, and most processes will have access to a port allowing them to send messages to the process manager.

  3. Memory

    Mach has a paged model of memory, with the virtual address space of a process divided up into regions, where regions are separated by undefined areas of the address space, and regions are divided up into pages. The Mach kernel does not handle page-faults!