{"id":305654,"date":"2011-07-07T14:00:16","date_gmt":"2011-07-07T21:00:16","guid":{"rendered":"https:\/\/www.microsoft.com\/en-us\/research\/?p=305654"},"modified":"2016-10-15T10:59:45","modified_gmt":"2016-10-15T17:59:45","slug":"barrelfish-exploring-multicore-os","status":"publish","type":"post","link":"https:\/\/www.microsoft.com\/en-us\/research\/blog\/barrelfish-exploring-multicore-os\/","title":{"rendered":"Barrelfish: Exploring a Multicore OS"},"content":{"rendered":"

By Rob Knies, Managing Editor, Microsoft Research<\/em><\/p>\n

Multicore and many-core processors represent the future of computing.<\/p>\n

Concerns with power consumption and heat management have limited the ability of chip manufacturers to continue to provide more processing power via faster clock speeds. Consequently, to deliver the ever-increasing performance to which we\u2019ve all grown accustomed, processor makers have turned to developing chips with multiple cores to gain efficiency.<\/p>\n

The problem is that current operating systems were not designed to support computers with large numbers of processing cores. Efforts are afoot to make existing operating systems work well on existing hardware, but such attempts are incremental at best, and within five or 10 years, we\u2019ll need a new paradigm.<\/p>\n

That\u2019s what researchers from Microsoft Research and the Systems Group (opens in new tab)<\/span><\/a> in the Department of Computer Science at ETH Zurich, the Swiss Federal Institute of Technology, are attempting to define.<\/p>\n

They have developed a new operating system for research, called Barrelfish (opens in new tab)<\/span><\/a>, as a project to determine how best to negotiate this new era of multicore processing.<\/p>\n

Work began on Barrelfish in October 2007, starting from scratch, so the researchers involved could explore the implications of multicore computing in detail without the need to worry about existing code in current computer operating systems.<\/p>\n

\"Paul

Paul Barham<\/p><\/div>\n

\u201cI see this as a way to explore fairly radical changes to the way people use computers,\u201d says Paul Barham, a principal researcher. \u201cAs an operating systems researcher, if you\u2019re starting from an existing operating system and modifying it, there are so many constraints that it\u2019s really difficult to try radical ideas.<\/p>\n

\u201cThese are the kinds of things that it\u2019s much easier to play with on a clean slate.\u201d<\/p>\n

Fellow researcher Rebecca Isaacs\u2014who, like Barham, has moved from Microsoft Research Cambridge (opens in new tab)<\/span><\/a> to Microsoft Research Silicon Valley as the project has evolved\u2014says Barrelfish represents an opportunity to get ahead of the hardware curve.<\/p>\n

\u201cMulticore is the only type of machine that we\u2019re going to be buying soon,\u201d she says. \u201cYou\u2019re going to be getting more and more cores on your desktop. We have to rethink how we structure operating systems to deal with this kind of hardware.\u201d<\/p>\n

One thing the project does not<\/em> represent, however, is a new Microsoft operating system. Barrelfish is intended as a proof of concept to establish a research foundation for exploration of this new, multicore hardware.<\/p>\n

\u201cWe\u2019re certainly not trying,\u201d Barham states, \u201cto come up with a replacement for Windows.\u201d<\/p>\n

\"Rebecca

Rebecca Isaacs<\/p><\/div>\n

Adds Isaacs: \u201cWhat we are doing is structuring the software in a radically different way that will be more appropriate for the kinds of machines that we see emerging over the next five to 10 years.\u201d<\/p>\n

In recent years, computer hardware has diversified at an increasing rate, more so than system software. Consequently, it is no longer realistic to fine-tune an operating system for a particular hardware model; the models in deployment vary wildly, and optimizations become obsolete quickly as the hardware evolves.<\/p>\n

Barham and longtime collaborator Timothy Roscoe (opens in new tab)<\/span><\/a> from ETH Zurich have been discussing operating systems for more than a decade, since they were Ph.D. students developing the Nemesis (opens in new tab)<\/span><\/a> research operating system at the University of Cambridge.<\/p>\n

\u201cA few years ago,\u201d Barham recalls, \u201cwe were on a train, discussing why there were still so many things that really haven\u2019t changed much with operating systems. We wanted an experimental platform to let us play with new directions for operating systems.<\/p>\n

\u201cThat\u2019s where the name Barrelfish came from. We could think of so many ideas that it would be like shooting fish in a barrel. Mothy used to work for Intel Research, where he gained insights into how processors were evolving across the industry, inspiring him to consider how operating systems would need to change to make the most of these evolutions. We could not see how current operating systems would be able to run on different types of hardware without having to rewrite them from scratch.\u201d<\/p>\n

It helped that Roscoe, now a computer science professor at ETH Zurich, which has a significant focus on technological research, had Ph.D. students of his own who were eager to work on such a project.<\/p>\n

\"Timothy

Timothy Roscoe<\/p><\/div>\n

“It seemed to us, and many others, that the hard challenges for future hardware, whether in a home, office, or data center, were really networking problems,\u201d Roscoe recalls.\u00a0\u201cWe were throwing all sorts of ideas around about how to program and manage collections of machines in new ways. But as we talked, it became clear that in the future, even within a single machine or a single OS, you would be looking at a networking problem, and that is really different from the way that current operating systems are designed.”<\/p>\n

As it turns out, Barham notes, many compelling research scenarios followed.<\/p>\n

\u201cInitially, we wanted to look at how, if you have more than one computer in your house or office, you could use all of those machines together as a single system,\u201d he says. \u201cThat\u2019s where I thought we would be doing research. But the way hardware\u2019s evolving, there are lots of interesting problems just designing an OS that was future-proof and could run on all the types of machines people are proposing. Dealing with that has occupied us for most of the early years of the project, and we haven\u2019t gotten around to shooting many fish yet.\u201d<\/p>\n

The main challenges for the Barrelfish researchers are scalability, expected to become increasingly difficult as the number of cores per chip increases, and processor and system heterogeneity.<\/p>\n

\u201cIn the next five to 10 years,\u201d Barham predicts, \u201cthere are going to be many varieties of multicore machines. There are going to be a small number of each type of machine, and you won\u2019t be able to afford to spend two years rewriting an operating system to work on each new machine that comes out. Trying to write the OS so it can be installed on a completely new computer it\u2019s never seen before, measure things, and think about the best way to optimize itself on this computer\u2014that\u2019s quite a different approach to making an operating system for a single, specific multiprocessor.\u201d<\/p>\n

The problem, the researchers say, stems from the use of a shared-memory kernel with data structures protected by locks. The Barrelfish project opts instead for a distributed system in which each unit communicates explicitly.<\/p>\n

Different Processors, Different Speeds<\/h2>\n

\u201cIf you look inside a modern computer,\u201d Barham says, \u201cyou have a number of potentially different processors running at different speeds, and there\u2019s a complicated interconnect between them, potentially lots of caches. This causes the insides of the single computer to behave as though it were a bunch of computers on a network.<\/p>\n

\u201cHistorically, when you get many computers on a network, you use distributed-systems techniques to deal with high communication latencies. There is a lot of theory analyzing how to make distributed systems work well. We\u2019re trying to take all of these good results from the last 15, 20 years and retarget them within a single computer, rather than using them on a bunch of machines on a network.\u201d<\/p>\n

This constitutes a radically different operating system structure, one based on the concept of a \u201cmultikernel.\u201d<\/p>\n

\"multikernel<\/p>\n

\u201cWe\u2019re thinking abstractly about the issues we want to address,\u201d Isaacs says. \u201cCan we come up with a reference model for how we think an operating system ought to be structured? That\u2019s what the multikernel is. It\u2019s 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.\u201d<\/p>\n

The project, as described in the paper The Multikernel: A new OS architecture for scalable multicore systems<\/em> (opens in new tab)<\/span><\/a>, delivered in October 2009 during the Association for Computing Machinery\u2019s 22nd Symposium on Operating Systems Principles, features three design principles:<\/p>\n