Multikernel
January 18th, 2010
1 I’ve always been a bit of an operating systems junkie. It suits my hacker nature because kernel hacking requires tinkering and taking things apart, which is something I’ve been doing since I was a child. Naturally, when a new operating system comes along, the first thing I want to do is install it either in a VM or preferably on real hardware.
As you would expect, when I heard about multikernel, I grabbed the source for the implementation, named Barrelfish, and printed all the relevant papers. Multikernel is a different take on operating system architecture jointly developed by folks at ETH Zurich and Microsoft Research, Cambridge. The researchers argue “the challenge of future multicore hardware is best met by embracing the networked nature of the machine, rethinking OS architecture using ideas from distributed systems.” In their paper, The Multikernel: A new OS architecture for scalable multicore systems, they write “we investigate a new OS structure, the multikernel, that treats the machine as a network of independent cores, assumes no inter-core sharing at the lowest level, and moves traditional OS functionality to a distributed system of processes that communicate via message-passing.” This is a novel approach to OS design, and the performance numbers they’re getting from Barrelfish are impressive.
Getting into a little more of the nitty-gritty about the implementation, there is more that is interesting about Barrelfish. First, each core has an exokernel (not the same implementation from MIT), an innovative OS architecture that runs on each core, with a monitor running on top handling all the message passing between the other exokernels on other cores. Concurrency through message passing is not a new idea. Plan 9 and Inferno use CSP (Communicating Sequential Processes, first described by Tony Hoare in 1978) instead of shared-memory threads. "Limbo":http://www.vitanuova.com/inferno/papers/limbo.html, Go, and Erlang are examples of programming languages with designed-in concurrency using the concepts in CSP. CSP is a safer and more scalable way to provide concurrency than shared-memory threads.
The novelty doesn’t stop with the kernel architecture. Barrelfish has done something interesting and innovative with how the system is programmed. In haskell, they wrote a framework for rapidly developing DSLs (Domain Specific Languages) named Filet-o-Fish. Barrelfish makes extensive use of DSLs for generating low-level operating system code in C. This is a really unique approach to writing an operating system. In addition, they have developed a correctness proof for Filet-o-Fish, which means they don’t have to reason about C code. Instead the developers can think at a higher level of abstraction, and the reliability of the operating system improves significantly.
An interesting project within the Barrelfish project is VMkit (master’s thesis here). VMkit is meant to be a lightweight hypervisor library for Barrelfish. VMkit isn’t in the current Barrelfish release, but they plan to include it in the next release, some time before the end of the year. Hypervisors are an intereting area of research, and there are a lot of implementations, e.g., Xen, L4 Pistachio, QEMU, VMware. What is unique about VMkit is it’s lightweight nature, simplicity, and security; the code that runs in privileged mode is only 500 lines, user mode code is 6000 lines. The separation of guest and monitor protects the monitor from corruption by the guest.
Barrelfish is still very much a research operating system and certainly not ready for production use. However, the ideas being pursued are compelling. I am looking forward to watching the operating system develop. More importantly, I am looking forward to getting under the hood to tinker and play. It’s nice to see innovation happening in operating systems research because there has been much stagnation, re-inventing of the wheel, and repeating past mistakes (see Rob Pike’s Systems Software Research is Irrelevant and The Good, the Bad, and the Ugly: The Unix Legacy for some examples).
Tagged with: Multikernel, Barrelfish
Related Posts
Author
1 Comment Leave a comment
Leave a comment
Allowed Tags
_emphasis_
*strong*
??citation??
-deleted text-
+inserted text+
^superscript^
~subscript~
@code@
Add code using a GIST
gist: gistid
I ran across this sometime last year — I hope it does not end up like most kernel projects where there are spurts of energetic mailing list activity for a couple of months then death for 4-5 years…
Reply to comment