Barrelfish Is a Multikernel OS for Multicore Heterogeneous Hardware
The Microsoft and ETH Zurich research teams have published the source code of Barrelfish, a multikernel operating system for the multicore heterogeneous hardware of the future.
Today’s operating systems have been adapted to work on multiprocessor and multicore hardware, but they were not initially designed with multicore in mind, and they are not ready for heterogeneous hardware with hundreds of cores that is to come in the following ten years. The main problem is the concept of shared-memory and the contention arising from accessing the same data protected by locks. This is the problem that Barrelfish wants to address.
Barrelfish is a joint operating system research conducted by Microsoft Research and Systems Group from the Department of Computer Science at ETH Zurich, Switzerland, started in 2007 as an attempt to play on a completely new ground, free from the limitations introduced by existing operating systems. The team planned to build a concept OS with massive multi-core support and having the ability to be installed on new compatible hardware without having to be ported to it.
Barrelfish is using a multikernel concept, as depicted in the picture below:
Can we come up with a reference model for how we think an operating system ought to be structured? That’s what the multikernel is. It’s a model that describes the concept of structuring the operating system as a distributed system. We have the operating system state replicated on every node, and the operating system instances running on each core send messages to each other. Barrelfish is one implementation of the multikernel model.
The paper “The Multikernel: A new OS architecture for scalable multicore systems” (PDF) presented at ACM Symposium 2009 outlines Barrelfish’s three design principles:
- Make all inter-core communication explicit,
- Make OS structure hardware-neutral
- View state as replicated instead of shared
In a normal multiprocessor operating system all the processors would manipulate the same kernel-based structures using shared memory. Because all of these processors have caches, you end up with lots of little parts of the kernel data structures in the caches of each processor. Even though each core thinks it’s manipulating the same data structure, what’s actually happening is the hardware has to keep lots of copies of your operating system data structures consistent.
The cache-coherence protocols are getting extremely difficult to scale up to large numbers of processors. The operating system writer must think hard about which bits of the kernel state get copied between which processors when an operation is performed. When an update is made, which other processors need to know about it? Which data need to go to all the other cores? The idea of the multikernel is to make all those communication patterns explicit, so that rather than having to second-guess which cache lines get dragged around inside the machine, you run a separate kernel on each processor, and when you make a change, you send an explicit message describing the change to all the other cores. That is much more like a distributed system than a shared-memory program with threads.
Barrelfish ran initially on x86-64bit and ARM multiprocessor hardware, and recently support was added for Intel Single Chip Cloud, a research microprocessor with 48 cores, and Beehive (PDF), a many-core computer built on a single FPGA.
Uwe Zdun, Rafael Capilla, Huy Tran, Olaf Zimmermann Mar 09, 2014
Olav Maassen, Liz Keogh & Chris Matts Mar 08, 2014