L4 microkernel family
From Wikipedia, the free encyclopedia
L4 is a family of second-generation microkernels based on the original designs and implementations by German computer scientist Jochen Liedtke. Originally implemented as highly tuned Intel i386-specific assembly language code,[1] the API has seen extensive development in a number of directions, both in achieving a higher grade of platform independence and also in improving security, isolation, and robustness. There have been various re-implementations of the original binary L4 kernel interface (ABI) and its higher level successors, including L4Ka::Pistachio (Uni Karlsruhe), L4/MIPS (UNSW) and Fiasco (TU Dresden). For this reason, the name L4 has been generalized and no longer only refers to Liedtke's original implementation. It now applies to the whole microkernel family including the L4 kernel interface and its different versions.
Contents |
[edit] Design paradigm
Specifying the general idea of a microkernel, Liedtke states:
A concept is tolerated inside the microkernel only if moving it outside the kernel, i.e., permitting competing implementations, would prevent the implementation of the system's required functionality.[2]
In this spirit, the L4 microkernel only provides the four basic mechanisms: a thread model, a mechanism for synchronous thread communication, scheduling, and an address space abstraction.
An operating system based on a microkernel like L4 has to provide services as servers in user space that monolithic kernels like Linux or older generation microkernels include internally. For example, in order to implement a secure Unix-like system, servers will have to provide the rights management that Mach included inside the kernel.
[edit] History
The realization of drawbacks in design and performance of the first-generation Mach microkernel led a number of developers to re-examine the entire microkernel concept in the mid-1990s. The asynchronous in-kernel-buffering process communication concept used in Mach turned out to be one of the main reasons for its poor performance. This induced some of the Mach developers to put some time-critical components, like file systems or drivers, back inside the kernel, which of course, conflicted with the minimality concept of a true microkernel.
[edit] L3
Jochen Liedtke set out to prove that a well designed thinner IPC layer, with careful attention to performance and machine-specific (as opposed to platform independent) design could yield massive real-world performance improvements. Instead of Mach's complex IPC system, his L3 microkernel simply passed the message without any additional overhead. Defining and implementing the required security policies were considered to be duties of the user space servers. The role of the kernel was only to provide the necessary mechanism to enable the user-level servers to enforce the policies. L3 proved itself a safe and robust operating system, used for many years for example by TÜV SÜD.
[edit] L4
After some experience using L3, Liedtke came to realize that several other Mach concepts were also misplaced. By simplifying the microkernel concepts even further he developed the first L4 kernel which was primarily designed with high performance in mind. In order to wring out every bit of performance the entire kernel was written in assembly language. His work caused a minor revolution in operating system design circles. Soon it was being studied by a number of universities and research institutes, including IBM, where Liedtke started to work in 1996. At IBM's T.J. Watson Research Center Liedtke and his colleagues continued research on L4 and microkernel based systems in general.
[edit] L4Ka::Hazelnut
In 1999, Liedtke took over the Systems Architecture Group at the University of Karlsruhe, where he continued the research into microkernel systems. As a proof of concept that a high performance microkernel could also be constructed in a higher level language, the group developed L4Ka::Hazelnut, a C++ version of the kernel that ran on IA32- and ARM-based machines. The effort was a success — performance was still acceptable — and with its release the pure assembly language versions of the kernels were effectively discontinued.
[edit] Fiasco
In parallel to the development of L4Ka::Hazelnut, in 1998 the operating systems group of the TU Dresden (Technische Universität Dresden) started to develop their own C++ implementation of the L4 kernel interface, called Fiasco. In contrast to L4Ka::Hazelnut, which does not allow concurrency in the kernel at all and its successor L4Ka::Pistachio, which allows interrupts in the kernel only at specific preemption points, Fiasco is fully preemptible (with the exception of extremely short atomic operations) to achieve a low interrupt latency. This was considered necessary because Fiasco is used as the basis of DROPS, a hard real-time capable operating system, also developed at the TU Dresden.
[edit] Platform independence
[edit] L4Ka::Pistachio
Up until the release of L4Ka::Pistachio and newer versions of Fiasco, all L4 microkernels had been inherently tied close to the underlying CPU architecture. The next big shift in L4 development was the development of a platform independent API that still retained the high performance characteristics despite its higher level of portability. Although the underlying concepts of the kernel were the same, the new API provided many radical changes to previous L4 versions, including better support for multi-processor systems, looser ties between threads and address spaces, and the introduction of user-level thread control blocks (UTCBs) and virtual registers. After releasing the new L4 API (Version X.2 a.k.a. Version 4) in early 2001, the System Architecture Group at the University of Karlsruhe implemented a new kernel, L4Ka::Pistachio, completely from scratch, now with focus on both high performance as well as portability.
[edit] Newer Fiasco versions
The Fiasco microkernel has also been extensively improved over the years. It now supports several hardware platforms ranging from x86 through AMD64 to several ARM platforms. Notably, a version of Fiasco (FiascoUX) is able to run as a user-level application on top of Linux.
Fiasco implements several extensions to the L4v2 API. Exception IPC enables the kernel to send CPU exceptions to user-level handler applications. With the help of alien threads it is possible to perform fine-grained control over system calls. X.2-style UTCBs have been added. Furthermore, Fiasco contains mechanisms for controlling communication rights as well as kernel-level resource consumption. On top of Fiasco a collection of basic user level services are developed (called L4Env) that amongst others are used to para-virtualise current Linux version (2.6.x) (called L4Linux).
[edit] University of New South Wales and NICTA
Development also took place at the University of New South Wales (UNSW), where developers implemented L4 on several 64-bit platforms. Their work resulted in L4/MIPS and L4/Alpha, resulting in Liedtke's original version being retroactively named L4/x86. Like Liedtke's original kernels, the UNSW kernels (written in a mixture of assembly and C) were unportable and each implemented from scratch. With the release of the highly portable L4Ka::Pistachio, the UNSW group abandoned their own kernels in favour of producing highly-tuned ports of L4Ka::Pistachio, including the fastest-ever reported implementation of message passing (36 cycles on the Itanium architecture).[3] The group has also demonstrated that user-level device drivers can perform as well as in-kernel drivers,[4] and developed Wombat, a highly portable version of Linux on L4 that runs on x86, ARM and MIPS processors. On XScale processors, Wombat demonstrates context-switching costs that are up to 30 times lower than in native Linux.[5]
[edit] Current research and development
Recently the UNSW group, at their new home at National ICT Australia (NICTA), forked L4Ka::Pistachio into a new L4 version called NICTA::L4-embedded. As the name implies, this is aimed at use in commercial embedded systems, and consequently the implementation trade-offs favour small memory footprints and aim to reduce complexity. The API was modified to keep almost all system calls short enough so they do not require preemption points in order to ensure high real-time responsiveness.[6]
The NICTA group now focuses on turning L4 into a highly-secure and -reliable platform. A formal proof of the correctness of the implementation is in progress.[7] This is combined with the development of a new L4 API, called seL4, aimed at satisfying security requirements such as those of Common Criteria. The seL4 API is represented by an executable specification[8] written in Haskell. There is a similar project on performing an exhaustive analysis of the latencies of kernel operations. Further work is developing frameworks for building componentised systems on top of L4.[9]
The GNU Hurd project was considering adopting the L4 microkernel (GNU Hurd/L4 [1]) to replace Mach, but the new design will be capability-based and L4 did originally not support capabilities (now NICTA's new seL4 kernel is capability-based[10] and the commercial OKL4 kernel also supports capabilities, see below).
Osker [2], an OS written in Haskell, is being written to match the L4 specification; although this focuses on the use of a functional programming language for OS development, not strictly microkernel research.
[edit] Commercial deployment
In November 2005, NICTA announced that Qualcomm was deploying NICTA's L4 version on their Mobile Station Modem chipsets. This led to the use of L4 in mobile phone handsets on sale from late 2006. In August 2006, ERTOS leader and UNSW professor Gernot Heiser spun out a company called Open Kernel Labs (OK Labs) to support commercial L4 users and further develop L4 for commercial use, in close collaboration with NICTA. OK Labs distributes its own version of L4, called OKL4, which is descended from NICTA::L4-embedded, and is supported for x86, ARM and MIPS. OKL4 was initially distributed under a BSD license. Recent releases use a dual licensing scheme with a Sleepycat-style open-source license. OK Labs also distributes a para-virtualized Linux called OK Linux, a descendant of Wombat.
In April 2008, OK Labs released OKL4 2.1, which is the first public version of L4 using capability-based protection. OKL4 3.0 was released in October 2008.
[edit] References
- ^ Liedtke, Jochen (December 1993). "Improving IPC by kernel design". 14th ACM Symposium on Operating System Principles: 175–88.
- ^ Jochen Liedtke (December 1995). "On µ-Kernel Construction". Proc. 15th ACM symposium on Operating Systems Principles (SOSP): 237–250.
- ^ Gray, Charles; Chapman, Matthew; Chubb, Peter; Mosberger-Tang, David; Heiser, Gernot (April 2005). "Itanium—a system implementor's tale". USENIX Annual Technical Conference: 264–278.
- ^ Leslie, Ben; Chubb, Peter; FitzRoy-Dale, Nicholas; Götz, Stefan; Gray, Charles; Macpherson, Luke; Potts, Daniel; Shen, Yueting; Elphinstone, Kevin; Heiser, Gernot (September 2005). "User-level device drivers: achieved performance". Journal of Computer Science and Technology 5 (20): 654–664. doi: .
- ^ van Schaik, Carl; Heiser, Gernot (January 2007). "High-performance microkernels and virtualisation on ARM and segmented architectures". 1st International Workshop on Microkernels for Embedded Systems: 11–21, Sydney, Australia: NICTA. Retrieved on 2007-04-01.
- ^ Ruocco, Sergio (October 2008). "A Real-Time Programmer's Tour of General-Purpose L4 Microkernels". EURASIP Journal on Embedded Systems, Special Issue on Operating System Support for Embedded Real-Time Applications 2008: 1. doi:. http://www.hindawi.com/getarticle.aspx?doi=10.1155/2008/234710.
- ^ Tuch, Harvey; Klein, Gerwin; Norrish, Michael (January 2007). "Types, bytes, and separation logic". 34th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages: 97–108.
- ^ Derrin, Philip; Elphinstone, Kevin; Klein, Gerwin; Cock; David; Chakravarty, Manuel M. T. (September 2006). "Running the manual: an approach to high-assurance microkernel development". ACM SIGPLAN Haskell Workshop: 60–71.
- ^ Kuz, Ihor; Liu, Yan; Gorton, Ian; Heiser, Gernot (to appear). "CAmkES: a component model for secure microkernel-based embedded systems". Journal of Systems and Software 80: 687. doi: .
- ^ Gernot Heiser and Kevin Elphinstone and Ihor Kuz and Gerwin Klein and Stefan M. Petters (July 2007). "Towards Trustworty Computing Systems: Taking Microkernels to the Next Level". Operating Systems Review 41 (4).
[edit] Further reading
- Jochen Liedtke, Ulrich Bartling, Uwe Beyer, Dietmar Heinrichs, Rudolf Ruland, Gyula Szalay. Two years of experience with a μ-Kernel based OS, ACM Press 1991
- Liedtke, Jochen; Haeberlen, Andreas; Park, Yoonho; Reuther, Lars; Uhlig, Volkmar (2000-10-22). "Stub-Code Performance is Becoming Important" (PDF). In Proceedings of the 1st Workshop on Industrial Experiences with Systems Software (WIESS), San Diego, CA, October 2000. Retrieved on 2006-09-05. (on L4 kernel and compiler)
- Cheng Guanghui, Nicholas Mc Guire. L4/Fiasco/L4Linux Kickstart, Distributed & Embedded Systems Lab - Lanzhou University
[edit] External links
- L4ka publications
- L4Hq – L4 headquarters, community site for L4 projects
- The L4 microkernel family – Overview over L4 implementations, documentation and projects
- L4Ka – Implementations L4Ka::Pistachio and L4Ka::Hazelnut
- Fiasco – A free C++ implementation for x86 and ARM processors
- UNSW – Implementations for DEC Alpha and MIPS architecture
- OKL4 – Commercial L4 version from Open Kernel Labs
- NICTA L4 – Research Overview and Publications
- L4Linux – Linux running on L4 microkernel
- DROPS – The Dresden Real-Time Operating System Project
- China Comp L4 Research Group – The China Computer µKernel L4 Research Group
- Information about L3, L4's predecessor