February 16, 2008
Microkernel, nanokernel — what’s the difference?
There are things called "microkernels", such as our OKL4 microkernel. There are also things called "nanokernels". People ask whether there is a difference, after all, "nano" sounds smaller than "micro", right?
The reality is that the term "nanokernel" represents a victory of marketing over substance.
Back in the late '80s and early '90s, "microkernels" such as Mach and Chorus were popular. Soon after people realised that their performance sucked, and the whole concept got a very bad name. Turns out, those kernels weren't "micro" at all, they were huge. Mach, for example, had 100s of APIs and consisted of 100s of kLOC. Definitely not micro.
So, some people who were building much smaller kernels called them "nanokernels" (followed by "picokernels", "femtokernels", "attokernels"...) Many of them weren't particularly small either.
Things changed when my late friend Jochen Liedtke presented L4 (the parent of OKL4), and showed that it ran rings around the likes of Mach, Chorus, QNX, etc. L4 was really small, less than ten system calls, and consisting of a few kLOC. Inspite of L4 being smaller than almost all of the other (nano-, pico-, ...) kernels around, Jochen kept calling L4 a microkernel. And he finally provided a clear definition of a microkernel that is now accepted throughout the operating-systems research community: a microkernel is a kernel that is minimal. Meaning that it contains only code that must be in the kernel (i.e. the software executing in the privileged mode of the hardware), nothing else. Obviously, this definition leaves no space for any smaller kernels.
The only thing that can be smaller than a microkernel is something that is not a complete kernel, i.e. there is other code that also executes in privileged mode. This is typically the case for a hardware-abstraction layer (HAL), and some people call their HAL a "nanokernel". Why, if there is a perfectly well-known and unambiguous name for it?
So, if you hear someone refer to using a "nanokernel", you have to suspect that either they don't understand the concept of a microkernel, they missed the last 15+ years of progress in operating systems in a time warp, or they can't spell "hardware-abstraction layer". Or their marketing department thinks it knows better than their engineers. (Imagine how the capabilities of their products will relate to their marketing...) Or all of the above.
Posted by Gernot Heiser on February 16 at 09:04 PM
About Gernot Heiser:
Gernot Heiser, Chief Technology Officer, never thought he would be in the business world. Prior to NICTA's creation in 2003, Dr Heiser was a full-time faculty member at the University of New South Wales. However, this die-hard academic couldn’t pass up the opportunity to see the commercialization of this research. Gernot still loves teaching, almost as much as he loves good wine and good food. And anyone will tell you that Gernot knows his wine.


