Hacker News new | past | comments | ask | show | jobs | submit login
The next operating system: building an OS for hundreds, thousands of cores (web.mit.edu)
101 points by bitsai on Feb 24, 2011 | hide | past | favorite | 38 comments



Color me skeptical. The project will fail, of course, because it is too ambitious. There are too many required new developments for it all to come together: new chip, new OS, new forms of scheduling, a lot more bookkeeping, not to mention new programming paradigms and compiler technology. I would not be surprised that bookkeeping and bandwidth would eat up 90% of the processing cycles. (Obviously, I'm pulling this out of my nether end.)

It feels to me that is the next iteration of refinements of technology that is 40 - 50 years old. Caches are what, from 1970? Interconnect issues date from the same time. I think machine cycles are in abundance, the scarce resource is interconnections for data flow. So one of the first things you want to do is organize your data flow so that processing is local. Think simulations like vision processing, weather prediction, rendering, where a processor can work locally and pass on a reduced amount information to its neighbors. The interesting problems arise when the results have to be delivered non-locally. If you store them in main memory for the recipient to pick them up, you run into bandwidth problems.

So what I see as needed is gazillions of low level worker bees with modest bandwidth requirements that have semi-permanent connections to the consumers of their output. Think the human brain, Google search, image rendering.

Apologies for the rambling, lack of citations, etc. etc, but I am interested in HNer's views on these issues.


I think you're seeing this project too much from the perspective of whether it will succeed/fail in the marketplace. That is not the point of research. This should be viewed as an exploratory search for new paradigms in multicore computing. Some components might work out to something usable, most won't.


I agree with you completely. It is worth doing for what we learn, but what I was trying to say is that the real breakthroughs are going to come from other directions. The people who will get rich are probably the generation after that.


Not the original poster, but I think it'll fail in the sense of "won't actually invent and tie together all the new components that this press release claims will be invented and tied together", even without including marketplace considerations.

However I agree that it'll likely produce interesting research advances and usable components, and some up-front overselling is probably unavoidable... saying something like, "we're initiating a collection of research projects to produce technologies that will be needed for a future generation of operating systems" isn't as good PR as saying, "we're building the next-gen operating system".


As I understand it, the projects and efforts you mention didn't "fail fail" - the computers didn't explode incinerating the buildings and the programmers involved.

The ideas failed in a relative fashion. They failed to yield that many result relative relative to the effort and resources that were put into them. And they especially failed to yield as many results as you could get by just increasing raw clock speed. And their cost was not just their raw complexity but the training required for programmer to understand parallelism (the low cost of today's "entry level" programmer is a huge bogus to the IT industry. If companies had to spend a year on system-specific training, the cost would be vast).

But given that such projects were only failures relative to the alternative of just coming up with a simple architecture with a higher clock speed, if the alternative is going away, there's no reason they can't become relative successes. Watson was a relative success - if you could have Watson-level processing-power on a single chip programmable with Ruby, the effort IBM put into the project would look silly. But since it looks you can't, Watson seems like a productive use of resources.

In a lot of ways, the last thirty years have involved substituting low-cost, high-power chips for high-price, high-skill programmers yielding a huge, de-skilled programming workforce. The end of Moore's-law-for-speed would seem to mean things will move differently in the future.

I won't address the particular architecture points you make, which all sound good but are unrelated to the general of previous parallelism efforts "failing".


I think there's some confusion about this project, since the article doesn't go into to much detail about what it actually is, apart from some high-level technical highlights. My understanding (which is potentially outdated) is that Angstrom is a collaboration effort between different groups who are trying to combine their separate research into a larger project.

For the criticism that the project will "fail", I think there's some merit. Will this produce the next computation system that the world uses? Probably not. Will this push the boundaries of engineering and improve on the state of the art? Almost certainly. And due to its scale, and the fact that Angstrom was created by combining multiple separate projects, there's also room for individual projects or ideas to succeed even if others don't.

My background is that I worked on the FOS project, which is the part that is most related to the title of this post. If you were looking for more technical meat, I encourage you to check out the project page: http://groups.csail.mit.edu/carbon/?page_id=39


Since starting to learn Erlang, I've been wondering if there's been any effort to build an operating system on top of the Erlang VM to exploit its concurrency... seems like it might be a good fit for this project.


The problem is that parallelism, and performance at this level in general, is not the kind of problem that you can solve by adding additional layers of abstraction. I can only speak to FOS, and not the other projects, but the idea behind it is to optimize the stack all the way down. My guess is that if you tried to run the Erlang VM on a 1000-core cpu, it would run into Linux scalability issues, regardless of how parallel Erlang is. Instead, we need to think about the base primitives of how we interact with the hardware, and potentially redesign them in a way that let us fully utilize the hardware.



Hmm... is it possible to extend the Erlang turtles further down, as it were, and re-write some of the stuff the VM is based on in Erlang, similar to Ruby/Rubinius?


I'd think the Erlang VM a bit slow as a systems language, but I dream of Erlang as an apps language (à la Objective-C) with a deep integration of the OS and the language runtime (a Lisp Machine in Erlang, and without hardware support, kinda)


Too much overview, not enough meat. Are there any whitepapers available for the Angstrom Project? The publication page of their website just says "coming soon."

http://projects.csail.mit.edu/angstrom/Publications.html


As long as they don't write the thing in C ...


What would you write it in?


The problem with C is that it's not memory safe. Therefore you need hardware hacks (MMU) to separate processes. If you use a memory safe language you lose the ability to do pointer arithmetic (and the speed hacks that come with it), but you don't need to remap the page table every time you switch between processes. This makes threads and processes pretty much the same thing. Code injection is impossible in a memory-safe language, which helps with security (I'm talking about buffer overflows here, not SQL injecion, XSS etc).

Using a higher-level language can also help with many other things, for example integrated garbage collection, built-in serialization and process migration, intelligent message passing (pass objects around rather than bytes), etc.

A good example of an implementation of these ideas is Singularity (http://research.microsoft.com/en-us/projects/singularity/), which is written in a superset of C#.


Therefore you need hardware hacks (MMU) to separate processes

I cannot apprehend the confusion of ideas that would lead you to believe this is caused by C. It's assembly, not C, that runs on your machine, and assembly is not memory safe. Microsoft's Singularity runs managed code, so there's a software layer providing memory protection.

An operating system is not defined by its preferred programming language.


"I cannot apprehend the confusion of ideas that would lead you to believe this is caused by C. It's assembly, not C, that runs on your machine, and assembly is not memory safe"

There is no confusion of ideas, but I like the Babbage reference :)

In Singularity the code is compiled first to CIL, then to x86, x64, or ARM by an AOT (ahead-of-time) compiler. Now here's the thing: the OS loader does not load Assembly code, it loads CIL code, which it then compiles further down to Assembly. Since CIL is verifiably memory safe (like Java bytecode), and assuming the AOT compiler is not buggy, the OS is memory safe. Hence no need for MMU/MPU to do memory protection.

So even though you're right that Assembly is not memory safe, the final compiler stage (in this case CIL can be seen as an intermediary language) is implemented in the OS (the loader), and the OS will reject any non-memory safe code. No code that can write outside array boundaries, violates type safety, and attempts pointer arithmetic will be allowed to execute.

So no, Singularity does not provide a software layer for memory protection, it's purely an (intermediary) language feature.


The software layer for memory protection here is the AOT compiler. As you alluded to yourself, if Mark Dowd finds one of the bugs in your AOT compiler, then you are toast.

The nice thing is that these protections can be applied ahead-of-time rather than at runtime, as the MMU does.

It has been shown (see Native Client) that even a slightly restricted subset of x86 assembler can be made verifiably-safe. In principle, you could do the same thing with C - in fact, you likely wouldn't even have to change the language definition, since the egregious abuses in C mostly result in "undefined behaviour", which allows the implementation to detect and trap them rather than hose the machine. (It is a curious fact that C itself isn't inherently "memory unsafe" - merely almost every implementation of C ever written is).


People have attempted to make C memory safe (i.e. bitc, cyclone), so you could write an OS in that, I guess. My original point however was that C itself is not, and that supporting C means supporting non-memory safe drivers, services, and programs.

If you can come up with a program that verifies whether a C program is memory safe or not (without constraining the language spec), well, hats off to you sir, I think I know a couple of security experts who might want to have a word with you :)


VM is also useful to handle fragmentation and to map parts of a large "array" to different NUMA nodes (so that it can be accessed by several threads without overloading a single memory channel). In a multi-process system, if you get rid of VM, you'll be pretty much obliged to have kernel-level relocating GC or to make array indexing involve software table lookup. I keep my TLB, thank you.


Just to digress slightly, if I can ask a question.

Does the x86 still use a page-based memory model? I was under the impression it went to a full range addressing model with the P6.

Page-based memory was what stopped me learning x86 assembly back in the day. I loved the Z-80 (and Rodney Zacks).


BitC maybe (if it ever reaches a stable 1.0 release): http://www.bitc-lang.org/

Cyclone would be another candidate: http://cyclone.thelanguage.org/

Cilk would be another interesting option, with its built-in support for concurrency: http://software.intel.com/en-us/articles/intel-cilk-plus/


Rust :)

Compiled, concurrent, and memory-safe, with no global GC.

(Full disclosure: I work on Rust.)


{ write it in javascript }

In all seriousness, when you have to support hardware controllers whose only interface to the CPU is a memory block or I/O instructions, what other choice do you have besides C? I guess you have C++...


Any language in which you built support for that kind of manipulations? I mean it's not like C magically gets features.


  *Assembler
  *Forth
  *Any language which allows inline assembly.
  *Any statically typed language compiled to C: Haskell, Ocaml, Go, etc.


  *Any language that can reference memory locations directly.


Go. Maybe LuaJIT with some additions to the parser to allow optional Static typing. Smalltalk with an advanced JIT VM and parse/compile time type enforcement ala Strongtalk. Scheme.


There's a big difference between an OS and a VM, and they accomplish different things.

Go might be feasible, but forcing system-wide GC at random times for the entire system? GC is very hard to make concurrent and a single random-alloc GC'd memory space can't possibly scale to thousands of cores.


I think the problem is deeper than just concurrency and preventing GC pauses.

Since a kernel is something that is expected to run forever, it can't afford to leak anything over the long term. For most GCs, collecting that last little bit of garbage (in deterministic time) requires O(committed address space) memory bandwidth. A full-copy style GC may take O(object memory), which could be an improvement.

Now that memory and applications are routinely many gigabytes, this is a big deal.

It's hard enough for an ecommerce web server to maintain responsiveness, I couldn't imagine trying to respond to hardware IO interrupts in real time while running a collector like that.


> Go might be feasible, but forcing system-wide GC at random times for the entire system? GC is very hard to make concurrent and a single random-alloc GC'd memory space can't possibly scale to thousands of cores.

Erlang (and its way) is a much better fit there, I think it'd be a delightful apps language: the GC runs at the (erlang) process level, each process has its own heap, so even though the GC is a vanilla generational GC by the magic of the Erlang VM it turns into a highly concurrent pauseless GC (only needs to pause a single Erlang process at a time, and you generally have tens of thousands chugging along).


There's a big difference between an OS and a VM, and they accomplish different things.

Not so much as you might think. Both Smalltalk and Lisp were OSes early on. If you dig around in some early Smalltalk images, you'll find the 4 stubs for "put the drive head down" "pick the drive head up" "move the drive head out" "move the drive head in."


Yeah because Linux has worked out so badly...


It's a research project. User uptake is not a (major) factor.


Azul's systems seem to be doing fine with hundreds of cores, and I'm pretty sure it's just modified linux.


an OS for hundreds, thousands of cores

That's exactly what Microsoft Azure claims to be in their marketing literature.


This is an unfortunate case of people adopting technical terms for PR purposes. When we (FOS) say "OS", we mean that when you write a program for FOS, you think about it as if you are writing it for a single computer. It doesn't matter if that computer has multiple processors in it, or even if those processors are in different boxes and are only connected by ethernet.


By reporting what Microsoft is saying in their marketing literature, I'm neither advocating what they say is true, nor am I saying the work referred to in the article is a copy of their efforts. Evidently, you jumped to some conclusion like this. I am merely commenting on the behavior of their marketers. As a long time observer of the tech industry, I always find the behavior of marketers interesting, though not always in pleasant ways.

(I think it's wise to pay attention to how such forces change language.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: