Micro Kernel

From the FreeOnLineDictionaryOfComputing: http://nightflight.com/foldoc-bin/foldoc.cgi?query=microkernel

<operating system> An approach to operating system design emphasizing small modules that implement the basic features of the system kernel and can be flexibly configured. (1999-08-02)

But in reality, the performance of MicroKernel is often poor enough and the implementation is complicated enough that still today most OperatingSystems are written using MonolithicKernel.
OTOH, the MIT ExoKernel operating system is said to be very fast.

OTOH, BeOS and QNX are microkernel based and are very fast. In fact, I am considering removing the above remark due to its blaring incorrectness. The reason most people are using monolithic kernels is legacy.

Mach, WindowsNtKernel, GnuHurd and XNU (kernel of MacOsx) are examples of MicroKernel. -- TakuyaMurata

XNU is not a MicroKernel, it is a kernel obtained by merging the Mach MicroKernel with parts of the BSD kernel and parts specific to Darwin, all running in kernel space.

WindowsNtKernel is also not actually a microkernel, although it was marketed as a microkernel when microkernels were fashionable. For example, the NT executive (aka the kernel) is implemented above a hardware abstraction layer. In a true microkernel OS, the kernel itself is the hardware abstraction layer. And now, since the graphics and GUI components have been moved into kernel space, NT is even less of a microkernel OS.

The use of microkernels in 'real' operating systems like Darwin is a bit weird. The big idea of microkernels is that the kernel can be split up into independent parts ('servers') which communicate with each other and applications through message-passing; crucially, these are genuinely separate user-level processes, so they are protected from one another's bugs, can crash or be shut down without taking down the system, can be dynamically replaced at runtime, etc. In Darwin etc, the whole kernel is still a single kernel-level entity, with the microkernel compiled in; the microkernel is simply being used to provide a flexible and consistent infrastructure for the rest of the kernel. This is all down to performance reasons, i think.

The best example I've seen of a true MicroKernel is the EllFour microkernel (whose main author has unfortunately passed away). They ported Linux to run on top of this kernel (L4/Linux) and there is a rewrite-in-C++ project going on, etc.

L4 has only three abstractions (or two, depending on how you count). It has only 7 API functions! A far cry from Windows with its HAL, or Mach, or even normal Linux. :)

-- WylieGarvin

I actually think the 'big idea' of microkernels is that the system's kernel should contain only the concepts, and the functionality, which *absolutely must* be in the kernel in order to build a secure, high-performance system. Many first-generation microkernels like Mach include a lot of stuff in the microkernel which doesn't strictly need to be there. Microkernels like L4 are much closer to this ideal, and perform much better as a result. L4 includes almost nothing besides threads, address-space construction and IPC. Everything else can be built efficiently out of these in user-mode servers.

Here are some research papers from 1997 about L4 and the design of efficient microkernels: Smallness (and fastness) have been achieved in some modern microkernels like L4. The failure of Mach and other first-generation microkernels is not due to a fundamental flaw in the microkernel idea. The flaws were implementation-specific. They were large and complicated and that's why they were slow.

Why do microkernels matter? Because a properly-designed microkernel system can be as fast as a monolithic kernel, and yet provide significantly more safety and flexibility. -- WylieGarvin

One of the most successful microkernel operating systems is QNX. The performance of the QnxOperatingSystem is certainly not "poor". It is also reliable enough to be used in safety critical systems such as nuclear power stations, aircraft control systems, vehicle and traffic control systems, medical equipment, etc.

Interesting point: the QNX kernel is small enough to fit into the first-level processor cache.

QnxNeutrino is the name of the microkernel in QNX's flagship products. It's pretty good stuff.

Is there any truth to the rumor that MACH really stands for MicroKernel Architectures ConsideredHarmful?


Just to add, Windows NT is a hybrid MicroKernel. The communications between ring 0 and ring 1 (the two core abstract rings in it's design) is done through message passing. Ring 1 in pure microkernels shouldn't have direct hardware access but it does in NT. This is for one reason only - latency and the fact that PC hardware is shit and very hard to do IO with through passing messages. The graphics interface is through the HAL which is ring 1 and the UI is at the same level but can only pass messages to the GDI HAL. It's as secure as any other OS structured in this way. In many ways it's superior as from a usability point of view in its target markets, it's spot on.

I think AndrewTanenbaum should be mentioned on this page, but I can't figure out how.

He had a famous "discussion" with LinusTorvalds regarding the various merits and drawbacks of microkernels. See http://www.dina.dk/~abraham/Linus_vs_Tanenbaum.html.

He also released his MicroKernel based minix 3 operating system. http://www.minix3.org.

View edit of August 25, 2007 or FindPage with title or text search