I just read an interesting HotOS paper titled: "Turning Down the LAMP: Software Specialisation for the Cloud." The authors explore the idea of condensing the software stack needed for an application. For instance, your application code is using a language runtime, isolated in a user-space process, talking to a MySQL process, reporting back to an Apache instance, running under the Linux kernel, all executing as a virtual machine in the Xen hypervisor. The paper introduces the Mirage system to shrink this down to three layers: App Code, Mirage Kernel, and Xen.
Specifically, they compile an OCaml program straight from source code to a virtual machine image that can run under Xen. The stuff that would be provided by the OS, like concurrency, storage, and isolation, is provided by libraries and the OCaml runtime. The runtime only includes features needed by the application, so it's lighter and faster than Linux. Without having to worry about Posix, the application can make better use of system hardware. It can do some things better: OCaml programs can be statically verified to be safe, so everything runs in only one address space with minimal memory protection (like Singularity).
This was just a workshop paper, so their ideas and evaluation aren't flushed out fully. I look forward to seeing the full version of this paper.
This idea of specializing a kernel for the application isn't a new idea. But when you think about this as a cloud service, the Mirage model starts to look like a different picture: Exokernels. Let's see:
- One thin layer that multiplexes hardware: Check! (exokernel / Xen)
- OS functionality provided by application: Check! (libos / Mirage kernel)
- Application runs on the kernel best suited for it: Check!
So 16 years after exokernels were first proposed, we're back to exploring the same architecture. Except our exokernel is called Xen.
No comments:
Post a Comment