L4 is a family of second-generation
microkernels, used to implement a variety of types of
operating systems (OS), though mostly for
Unix-like, ''Portable Operating System Interface'' (
POSIX) compliant types.
L4, like its predecessor microkernel
L3, was created by
German
German(s) may refer to:
* Germany (of or related to)
**Germania (historical use)
* Germans, citizens of Germany, people of German ancestry, or native speakers of the German language
** For citizens of Germany, see also German nationality law
**Ger ...
computer scientist
A computer scientist is a person who is trained in the academic study of computer science.
Computer scientists typically work on the theoretical side of computation, as opposed to the hardware side on which computer engineers mainly focus (al ...
Jochen Liedtke as a response to the poor performance of earlier microkernel-based OSes. Liedtke felt that a system designed from the start for high performance, rather than other goals, could produce a microkernel of practical use. His original implementation in hand-coded Intel
i386-specific
assembly language
In computer programming, assembly language (or assembler language, or symbolic machine code), often referred to simply as Assembly and commonly abbreviated as ASM or asm, is any low-level programming language with a very strong correspondence be ...
code in 1993 sparked intense interest in the computer industry. Since its introduction, L4 has been developed to be
cross-platform and to improve
security
Security is protection from, or resilience against, potential harm (or other unwanted coercive change) caused by others, by restraining the freedom of others to act. Beneficiaries (technically referents) of security may be of persons and social ...
, isolation, and
robustness
Robustness is the property of being strong and healthy in constitution. When it is transposed into a system, it refers to the ability of tolerating perturbations that might affect the system’s functional body. In the same line ''robustness'' ca ...
.
There have been various re-implementations of the original binary L4
kernel application binary interface (ABI) and its successors, including ''L4Ka::Pistachio'' (
Karlsruhe Institute of Technology
The Karlsruhe Institute of Technology (KIT; german: Karlsruher Institut für Technologie) is a public research university in Karlsruhe, Germany. The institute is a national research center of the Helmholtz Association.
KIT was created in 2009 w ...
), ''L4/MIPS'' (
University of New South Wales (UNSW)), ''Fiasco'' (
Dresden University of Technology (TU Dresden)). For this reason, the name ''L4'' has been generalized and no longer refers to only Liedtke's original implementation. It now applies to the whole
microkernel family including the L4 kernel
interface and its different versions.
L4 is widely deployed. One variant, OKL4 from
Open Kernel Labs
Open Kernel Labs (OK Labs) is a privately owned company that develops microkernel-based hypervisors and operating systems for embedded systems. The company was founded in 2006 by Steve Subar and Gernot Heiser as a spinout from NICTA. It was headq ...
, shipped in billions of mobile devices.
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.
In this spirit, the L4 microkernel provides few basic mechanisms:
address space
In computing, an address space defines a range of discrete addresses, each of which may correspond to a network host, peripheral device, disk sector, a memory cell or other logical or physical entity.
For software programs to save and retrieve st ...
s (abstracting page tables and providing memory protection),
threads
Thread may refer to:
Objects
* Thread (yarn), a kind of thin yarn used for sewing
** Thread (unit of measurement), a cotton yarn measure
* Screw thread, a helical ridge on a cylindrical fastener
Arts and entertainment
* ''Thread'' (film), 2016 ...
and
scheduling (abstracting execution and providing temporal protection), and
inter-process communication
In computer science, inter-process communication or interprocess communication (IPC) refers specifically to the mechanisms an operating system provides to allow the processes to manage shared data. Typically, applications can use IPC, categori ...
(for controlled communication across isolation boundaries).
An operating system based on a microkernel like L4 provides services as servers in
user space that
monolithic kernels like
Linux or older generation microkernels include internally. For example, to implement a secure
Unix-like system, servers must provide the rights management that
Mach
Mach may refer to Mach number, the speed of sound in local conditions. It may also refer to:
Computing
* Mach (kernel), an operating systems kernel technology
* ATI Mach, a 2D GPU chip by ATI
* GNU Mach, the microkernel upon which GNU Hurd is bas ...
included inside the kernel.
History
The poor performance of first-generation microkernels, such as
Mach
Mach may refer to Mach number, the speed of sound in local conditions. It may also refer to:
Computing
* Mach (kernel), an operating systems kernel technology
* ATI Mach, a 2D GPU chip by ATI
* GNU Mach, the microkernel upon which GNU Hurd is bas ...
, 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 developers of Mach-based operating systems to move some time-critical components, like file systems or drivers, back inside the kernel. While this somewhat ameliorated the performance issues, it plainly violates the minimality concept of a true microkernel (and squanders their major advantages).
Detailed analysis of the Mach bottleneck indicated that, among other things, its
working set
Working set is a concept in computer science which defines the amount of memory that a process requires in a given time interval.
Definition
Peter Denning (1968) defines "the working set of information W(t, \tau) of a process at time t to be the ...
is too large: the IPC code expresses poor spatial locality; that is, it results in too many
cache misses, of which most are in-kernel.
This analysis gave rise to the principle that an efficient microkernel should be small enough that the majority of performance-critical code fits into the (first-level) cache (preferably a small fraction of said cache).
L3
Jochen Liedtke set out to prove that a well designed thinner
inter-process communication
In computer science, inter-process communication or interprocess communication (IPC) refers specifically to the mechanisms an operating system provides to allow the processes to manage shared data. Typically, applications can use IPC, categori ...
(IPC) layer, with careful attention to performance and machine-specific (in contrast to
cross-platform software) design could yield large real-world performance improvements. Instead of Mach's complex IPC system, his L3 microkernel simply passed the message with no added 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 needed mechanism to enable the user-level servers to enforce the policies. L3, developed in 1988, proved itself a safe and robust
operating system, used for many years for example by
Technischer Überwachungsverein (Technical Inspection Association).
L4
After some experience using L3, Liedtke came to the conclusion 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 for high performance. To extract every bit of performance, the whole kernel was written in
assembly language
In computer programming, assembly language (or assembler language, or symbolic machine code), often referred to simply as Assembly and commonly abbreviated as ASM or asm, is any low-level programming language with a very strong correspondence be ...
, and its IPC was 20 times faster than Mach's.
Such dramatic performance increases are a rare event in operating systems, and Liedtke's work triggered new L4 implementations and work on L4-based systems at a number of universities and research institutes, including
IBM, where Liedtke started to work in 1996, TU Dresden and UNSW. At IBM's
Thomas J. Watson Research Center Liedtke and his colleagues continued research on L4 and microkernel based systems in general, especially the Sawmill OS.
L4Ka::Hazelnut
In 1999, Liedtke took over the Systems Architecture Group at the
University of Karlsruhe
The Karlsruhe Institute of Technology (KIT; german: Karlsruher Institut für Technologie) is a public research university in Karlsruhe, Germany. The institute is a national research center of the Helmholtz Association.
KIT was created in 2009 w ...
, 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
IA-32- 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.
L4/Fiasco
In parallel to the development of L4Ka::Hazelnut, in 1998 the Operating Systems Group TUD:OS of the TU Dresden started to develop their own C++ implementation of the L4 kernel interface, named L4/Fiasco. In contrast to L4Ka::Hazelnut, which allows no concurrency in the kernel, and its successor L4Ka::Pistachio, which allows interrupts in the kernel only at specific preemption points, ''L4/Fiasco'' was fully preemptible (with the exception of extremely short atomic operations) to achieve a low
interrupt latency. This was considered necessary because L4/Fiasco is used as the basis of DROPS, a hard
real-time computing capable operating system, also developed at the TU Dresden. However, the complexities of a fully preemptible design prompted later versions of Fiasco to return to the traditional L4 approach of running the kernel with interrupts disabled, except for a limited number of preemption points.
Cross-platform
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 cross-platform (platform-independent) application programming interface (
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 significant changes relative to prior 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 and portability. It was released under the
two-clause BSD license.
Newer Fiasco versions
The L4/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 (Fiasco-UX) can run as a user-level application on Linux.
L4/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. Also, Fiasco contains mechanisms for controlling communication rights and kernel-level resource use. On Fiasco, a collection of basic user level services are developed (named L4Env) that among others are used to para-virtualise the current Linux version (4.19 ) (named
L4Linux).
University of New South Wales and NICTA
Development also occurred 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 retrospectively named ''L4/x86''. Like Liedtke's original kernels, the UNSW kernels (written in a mix 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 favor of producing highly tuned ports of L4Ka::Pistachio, including the fastest-ever reported implementation of message passing (36 cycles on the
Itanium architecture).
The group has also demonstrated that
device driver
In computing, a device driver is a computer program that operates or controls a particular type of device that is attached to a computer or automaton. A driver provides a software interface to hardware devices, enabling operating systems and ot ...
s can perform equally well at user-level as in-kernel,
and developed
Wombat, a highly portable version of
Linux on L4 that runs on
x86,
ARM, and
MIPS processors. On
XScale processors, Wombat context-switching costs are up to 50 times lower than in native Linux.
Later the UNSW group, at their new home at
NICTA (formerly ''National ICT Australia, Ltd''.), forked L4Ka::Pistachio into a new L4 version named ''NICTA::L4-embedded''. As the name implies, it was for use in commercial
embedded systems, and consequently the implementation trade-offs favored small memory size and reduced complexity. The API was modified to keep almost all system calls short enough that they need no preemption points to ensure high real-time responsiveness.
Commercial deployment
In November 2005,
NICTA announced that
Qualcomm
Qualcomm () is an American multinational corporation headquartered in San Diego, California, and incorporated in Delaware. It creates semiconductors, software, and services related to wireless technology. It owns patents critical to the 5G, 4 ...
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 named
Open Kernel Labs
Open Kernel Labs (OK Labs) is a privately owned company that develops microkernel-based hypervisors and operating systems for embedded systems. The company was founded in 2006 by Steve Subar and Gernot Heiser as a spinout from NICTA. It was headq ...
(OK Labs) to support commercial L4 users and further develop L4 for commercial use under the brand name ''OKL4'', in close collaboration with NICTA. OKL4 Version 2.1, released in April 2008, was the first
generally available version of L4 which featured
capability-based security. OKL4 3.0, released in October 2008, was the last open-source version of OKL4. More recent versions are closed source and based on a rewrite to support a native hypervisor variant named the OKL4 Microvisor. OK Labs also distributed a paravirtualized Linux named OK:Linux, a descendant of Wombat, and paravirtualized versions of
SymbianOS
Symbian is a discontinued mobile operating system (OS) and computing platform designed for smartphones. It was originally developed as a proprietary software OS for personal digital assistants in 1998 by the Symbian Ltd. consortium. Symbian O ...
and
Android
Android may refer to:
Science and technology
* Android (robot), a humanoid robot or synthetic organism designed to imitate a human
* Android (operating system), Google's mobile operating system
** Bugdroid, a Google mascot sometimes referred to ...
. OK Labs also acquired the rights to ''seL4'' from NICTA.
OKL4 shipments exceeded 1.5 billion in early 2012,
mostly on Qualcomm wireless modem chips. Other deployments include
automotive infotainment systems.
Apple A series
Apple silicon is a series of system on a chip (SoC) and system in a package (SiP) processors designed by Apple Inc., mainly using the ARM architecture. It is the basis of most new Mac computers as well as iPhone, iPad, iPod Touch, Apple T ...
processors beginning with the
A7 contain a Secure Enclave
coprocessor
A coprocessor is a computer processor used to supplement the functions of the primary processor (the CPU). Operations performed by the coprocessor may be floating-point arithmetic, graphics, signal processing, string processing, cryptography o ...
running an L4 operating system
based on the L4-embedded kernel developed at
NICTA in 2006.
This implies that L4 is now shipping on all iOS devices, the total shipment of which is estimated at 310 million for the year 2015.
High assurance: seL4
In 2006, the
NICTA group commenced a from-scratch design of a
third-generation microkernel, named seL4, with the aim of providing a basis for highly secure and reliable systems, suitable for satisfying security requirements such as those of
Common Criteria
The Common Criteria for Information Technology Security Evaluation (referred to as Common Criteria or CC) is an international standard (ISO/IEC 15408) for computer security certification. It is currently in version 3.1 revision 5.
Common Criteria ...
and beyond. From the beginning, development aimed for
formal verification of the kernel. To ease meeting the sometimes conflicting requirements of performance and verification, the team used a
middle-out software process starting from an
executable specification written in
Haskell.
seL4 uses
capability-based security access control to enable formal reasoning about object accessibility.
A
formal proof of functional correctness was completed in 2009.
[
]
The proof provides a guarantee that the kernel's implementation is correct against its specification, and implies that it is free of implementation bugs such as
deadlocks,
livelock
In concurrent computing, deadlock is any situation in which no member of some group of entities can proceed because each waits for another member, including itself, to take action, such as sending a message or, more commonly, releasing a loc ...
s,
buffer overflows, arithmetic exceptions or use of
uninitialised variables. seL4 is claimed to be the first-ever general-purpose operating-system kernel that has been verified.
seL4 takes a novel approach to kernel resource management,
exporting the management of kernel resources to user level and subjects them to the same
capability-based access control as user resources. This model, which was also adopted by
Barrelfish, simplifies reasoning about isolation properties, and was an enabler for later proofs that seL4 enforces the core security properties of integrity and confidentiality.
The NICTA team also proved correctness of the translation from the programming language
C to executable
machine code, taking the
compiler out of the
trusted computing base of seL4.
This implies that the high-level security proofs hold for the kernel executable. seL4 is also the first published protected-mode OS kernel with a complete and sound
worst-case execution time (WCET) analysis, a prerequisite for its use in hard
real-time computing.
On 29 July 2014,
NICTA and
General Dynamics C4 Systems
General Dynamics Mission Systems is a business unit of American defense and aerospace company General Dynamics. General Dynamics Mission Systems integrates secure communication and information systems and technology. General Dynamics Mission Syst ...
announced that seL4, with end to end proofs, was now released under
open-source licenses.
The kernel
source code and proofs are
licensed under
GNU General Public License version 2 (GPLv2), and most
libraries and
tools
A tool is an object that can extend an individual's ability to modify features of the surrounding environment or help them accomplish a particular task. Although many animals use simple tools, only human beings, whose use of stone tools dates ba ...
are under the
BSD 2-clause. In April 2020, it was announced that the seL4 Foundation was created under the umbrella of the
Linux Foundation
The Linux Foundation (LF) is a non-profit technology consortium founded in 2000 as a merger between Open Source Development Labs and the Free Standards Group to standardize Linux, support its growth, and promote its commercial adoption. Additi ...
to accelerate development and deployment of seL4.
The researchers state that the cost of formal software verification is lower than the cost of engineering traditional "high-assurance" software despite providing much more reliable results. Specifically, the cost of one
line of code during the development of seL4 was estimated at around , compared to for traditional high-assurance systems.
Under the Defense Advanced Research Projects Agency (
DARPA) High-Assurance Cyber Military Systems (HACMS) program, NICTA together with project partners
Rockwell Collins, Galois Inc, the
University of Minnesota and
Boeing developed a high-assurance drone using seL4, along with other assurance tools and software, with planned technology transfer onto the optionally piloted autonomous
Boeing AH-6
The Boeing AH-6 is a series of light helicopter gunships based on the MH-6 Little Bird and MD 500 family. Developed by Boeing Rotorcraft Systems, these include the Unmanned Little Bird (ULB) demonstrator, the A/MH-6X Mission Enhanced Little Bir ...
Unmanned Little Bird helicopter being developed by Boeing. Final demonstration of the HACMS technology took place in Sterling, VA in April 2017.
DARPA also funded several
Small Business Innovative Research (SBIR) contracts related to seL4 under a program started by Dr.
John Launchbury
John Launchbury is an American and British computer scientist who is currently Chief Scientist at Galois, Inc. Previously, he directed one of DARPA’s technical offices, where he oversaw nation-scale scientific and engineering research in cybe ...
. Small businesses receiving an seL4-related SBIR included: DornerWorks, Techshot, Wearable Inc, Real Time Innovations, and Critical Technologies.
[
]
Other research and development
Osker, an OS written in
Haskell, targeted the L4 specification; although this project focused mainly on the use of a
functional programming language for OS development, not on microkernel research.
CodeZero is an L4 microkernel for embedded systems with a focus on virtualization and implementation of native OS services. There is a
GPL-licensed version, and a version that was relicensed by B Labs Ltd., acquired by
Nvidia, as closed source and forked in 2010.
F9 microkernel, a BSD-licensed L4 implementation, is dedicated to
ARM Cortex-M processors for deeply embedded devices with memory protection.
The NOVA OS Virtualization Architecture is a research project with focus on constructing a secure and efficient virtualization environment
with a small trusted computing base. NOVA consists of a microhypervisor, a user level
hypervisor (
virtual machine monitor), and an unprivileged componentised multi-server user environment running on it named NUL. NOVA runs on ARMv8-A and x86-based multi-core systems.
WrmOS is a
real-time operating system based on L4 microkernel. It has own implementations of kernel, standard libraries, and network stack, supporting ARM, SPARC, x86, and x86-64 architectures. There is the paravirtualized Linux kernel (w4linux
) working on WrmOS.
See also
*
PikeOS
PikeOS is a commercial, hard real-time operating system (RTOS) that offers a separation kernel based hypervisor with multiple logical partition types for many other operating systems (OS), each called a GuestOS, and applications. It enables user ...
References
Further reading
*
* (on L4 kernel and compiler)
*
* Evolution of L4 design and implementation approaches
External links
*
* , seL4
The L4 microkernel family overview of L4 implementations, documentation, projects
Official TUD:OS WikiL4Ka Implementations L4Ka::Pistachio and L4Ka::Hazelnut
UNSW Implementations for
DEC Alpha and
MIPS architecture
* : Commercial L4 version from
*
Trustworthy Systems Group at CSIRO's Data61 Present home of the former NICTA group that developed seL4
Genode Operating System Framework An offspring of the L4 community
{{Object-capability security
Capability systems
Microkernels
Assembly language software