Encyclopedia > Mach operating system

  Article Content

Mach kernel

Redirected from Mach operating system

Mach is an operating system kernel developed at Carnegie-Mellon University to support operating system research, primarily distributed and parallel computation. The project at CMU ran from 1985 to 1994.

Mach developed from the realization that all modern operating systems shared a number of features in common, or wanted to if they didn't already. These included:

  • support for multiple applications using multitasking
  • threads, which can be thought of as parts of an application, or mini-applications which then multitask
  • multi-processor support, in a single machine or over a network
  • interapplication communications, sending messages directly between applications
  • memory protection and safety

At the time, in the early to mid-1980s, any number of projects were attempting to address one of these problems. This typically meant taking an existing OS - often BSD - and modifying parts of it. After each modification the OS was compiled, the machine restarted, and the new change was tested. There were a number of problems with this approach, not the least of which was that even minor problems would cause the entire machine to crash.

Mach explored the concept that we now refer to as a microkernel. Instead of having all of the code for the operating system in a single large program (called the kernel), the majority of the code would instead be located in smaller programs known as servers which would run like any other program. The kernel's job was reduced from essentially "being" the OS, to maintaining the servers and scheduling their access to hardware.

In theory this meant that changes to the OS required nothing more than a re-loading of that single server program, as opposed to re-building OS and restarting the machine. Only work on the Mach kernel itself would require a restart, and in theory this should be a rare occurrence.

Mach is not an operating system on its own, and is largely unusable without a set of servers - and those servers did not exist. In order to get some sort of usable system up and running, the Mach authors ported BSD onto the Mach kernel in a quick-and-dirty fashion: instead of breaking down BSD into parts and building each of them as a server, they simply compiled the entire kernel into one server and ran it. The result was known as POE[?].

With POE running (effectively) beside the other applications, performance was abysmal. Every call from a user application, say to get the time, required the message to be sent to the kernel (an expensive operation known as a context switch), which would then send the request to the Unix library with another context switch - and then repeat it all again for the response! Thus Mach, through no real fault of its own, was generally considered to be very powerful, but incredibly slow.

Work over the next decade managed to improve the performance of these messages many times, to the point where the performance of late Mach-like operating systems was in fact often better than the BSDs they were based on. However by this point in time the academic world had largely lost interest in OS research, and Mach's promise remains unfulfilled.

At one time it was thought that Mach would slowly take over the entire operating system universe, but this has not happened. Perhaps the biggest reason for the general failure of Mach can be blamed on "laziness": everyone seemed to think it was someone else's job to deliver the library-based OS, and no one ever did. The largest effort to date is the HURD, but the HURD is now about a decade overdue. Several commercial operating systems have been more successful, including QNX which seems to deliver on all of Mach's promises.

Work on Mach took place for a number of years at CMU, but eventually became dormant when many of the players involved left school to work in industry. Mach was briefly revived at the University of Utah in the mid-1990s and produced Mach 4 (http://www.cs.utah.edu/flux/mach4/html/Mach4-proj) with significant improvements, before once again becoming dormant.

Meanwhile several vendors took practical approaches to using Mach. The BSD (or other) layer was run directly inside the kernel (thus avoiding lots of context switches) which resulted in reasonable performance while still retaining the advantages of multi-processing and an easy-to-use threading model. However even these advantages have been eroded as the various Unix vendors worked to provide them in their own products.

Versions of Mach-based operating systems of this ilk were found in OSF/1, NeXTSTEP, and IBM's OS/2 for the RS/6000-based machines - all of which are dead. Other operating systems looked to migrate to this sort of system as well, including Apple's Pink, IBM's Workplace OS, and any number of others.

However Mach then went on to become the most used Unix of them all, when Apple selected OpenStep to replace the Mac OS. OpenStep is in fact an upgraded version of NeXTSTEP's Mach 2.5 based operating system. Today the system has been further updated to Mach 3.0 with FreeBSD 4.3 as the POE, and is run on over 10 million machines worldwide.

All Wikipedia text is available under the terms of the GNU Free Documentation License

  Search Encyclopedia

Search over one million articles, find something about almost anything!
  Featured Article
North Lindenhurst, New York

... family size is 3.44. In the town the population is spread out with 25.6% under the age of 18, 7.5% from 18 to 24, 33.8% from 25 to 44, 21.3% from 45 to 64, and 11.8% ...

This page was created in 31 ms