Jump to content

L4 microkernel family

From Wikipedia, the free encyclopedia
(Redirected fromL3 microkernel)

L4 microkernel family
DeveloperJochen Liedtke
Written inAssembly language,thenC,C++
OS familyL4
Working stateCurrent
Source modelOpen source,closed source
Initial release1993;31 years ago(1993)
Marketing targetReliable computing
Available inEnglish, German
PlatformsInteli386,x86,x86-64,ARM,MIPS,SPARC,Itanium,RISC-V
KerneltypeMicrokernel
LicenseSource code,proofs:GPLv2
Libraries,tools:BSD 2-clause
Preceded byEumel
Official websiteos.inf.tu-dresden.de/L4

L4is a family of second-generationmicrokernels,used to implement a variety of types ofoperating systems(OS), though mostly forUnix-like,Portable Operating System Interface(POSIX) compliant types.

L4, like its predecessor microkernelL3,was created byGermancomputer scientistJochen Liedtkeas 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 Inteli386-specificassembly languagecode in 1993 created attention by being 20 times faster thanMach.[1] The follow-up publication two years later[2]was considered so influential that it won the 2015ACM SIGOPSHall of Fame Award. Since its introduction, L4 has been developed to becross-platformand to improvesecurity,isolation, androbustness.

There have been various re-implementations of the original L4kernelapplication binary interface(ABI) and its successors, includingL4Ka::Pistachio(implemented by Liedtke and his students atKarlsruhe Institute of Technology),L4/MIPS(University of New South Wales(UNSW)),Fiasco(Dresden University of Technology(TU Dresden)). For this reason, the nameL4has been generalized and no longer refers to only Liedtke's original implementation. It now applies to the wholemicrokernelfamily including the L4 kernelinterfaceand its different versions.

L4 is widely deployed. One variant, OKL4 fromOpen Kernel Labs,shipped in billions of mobile devices.[3][4]

Design paradigm[edit]

Specifying the general idea of amicrokernel,Liedtkestates:

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 provides few basic mechanisms:address spaces(abstracting page tables and providing memory protection),threadsandscheduling(abstracting execution and providing temporal protection), andinter-process communication(for controlled communication across isolation boundaries).

An operating system based on a microkernel like L4 provides services as servers inuser spacethatmonolithic kernelslikeLinuxor older generation microkernels include internally. For example, to implement a secureUnix-likesystem, servers must provide the rights management thatMachincluded inside the kernel.

History[edit]

The poor performance of first-generation microkernels, such asMach,led a number of developers to re-examine the entire microkernel concept in the mid-1990s. The asynchronous in-kernel-bufferingprocess communicationconcept 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.[citation needed]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, itsworking setis too large: the IPC code expresses poor spatial locality; that is, it results in too manycachemisses, of which most are in-kernel.[2]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[edit]

Jochen Liedtkeset out to prove that a well-designed thinnerinter-process communication(IPC) layer, with careful attention to performance and machine-specific (in contrast tocross-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 theuser spaceservers. 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 robustoperating system,used for many years for example byTechnischer Überwachungsverein(Technical Inspection Association).[citation needed]

L4 family tree (black arrows indicate code inheritance, green arrows ABI inheritance)

L4[edit]

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 maximise performance, the whole kernel was written inassembly language,and its IPC was 20 times faster than Mach's.[1]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, includingIBM,where Liedtke started to work in 1996, TU Dresden and UNSW. At IBM'sThomas J. Watson Research CenterLiedtke and his colleagues continued research on L4 and microkernel based systems in general, especially the Sawmill OS.[5]

L4Ka::Hazelnut[edit]

In 1999, Liedtke took over the Systems Architecture Group at theUniversity 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 developedL4Ka::Hazelnut,aC++version of the kernel that ran onIA-32- andARM-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[edit]

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/Fiascowas fully preemptible (with the exception of extremely short atomic operations) to achieve a lowinterrupt latency.This was considered necessary because L4/Fiasco is used as the basis of DROPS,[6]a hardreal-time computingcapable 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[edit]

L4Ka::Pistachio[edit]

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 thetwo-clause BSD license.[7]

Newer Fiasco versions[edit]

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 ofalien 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 as of May 2019) (namedL4Linux).

University of New South Wales and NICTA[edit]

Development also occurred at theUniversity of New South Wales(UNSW), where developers implemented L4 on several 64-bit platforms. Their work resulted inL4/MIPSandL4/Alpha,resulting in Liedtke's original version being retrospectively namedL4/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 theItaniumarchitecture).[8]The group has also demonstrated thatdevice driverscan perform equally well at user-level as in-kernel,[9]and developedWombat,a highly portable version ofLinuxon L4 that runs onx86,ARM,andMIPSprocessors. OnXScaleprocessors, Wombat context-switching costs are up to 50 times lower than in native Linux.[10]

Later the UNSW group, at their new home atNICTA(formerlyNational ICT Australia, Ltd.), forked L4Ka::Pistachio into a new L4 version namedNICTA::L4-embedded.As the name implies, it was for use in commercialembedded 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.[11]

Commercial deployment[edit]

In November 2005,NICTAannounced[12]thatQualcommwas deploying NICTA's L4 version on theirMobile Station Modemchipsets. This led to the use of L4 inmobile phonehandsets on sale from late 2006. In August 2006, ERTOS leader and UNSW professorGernot Heiserspun out a company namedOpen Kernel Labs(OK Labs) to support commercial L4 users and further develop L4 for commercial use under the brand nameOKL4,in close collaboration with NICTA.OKL4 μKernelVersion 2.1, released in April 2008, was the firstgenerally availableversion of L4 which featuredcapability-based security.OKL4 μKernel 3.0, released in October 2008, was the last open-source version of OKL4 μKernel. More recent versions are closed source and based on a rewrite to support a native hypervisor variant named theOKL4 Microvisor.OK Labs also distributed a paravirtualized Linux named OK:Linux, a descendant of Wombat, and paravirtualized versions ofSymbianOSandAndroid.OK Labs also acquired the rights toseL4from NICTA.

OKL4 shipments exceeded 1.5 billion in early 2012,[4]mostly on Qualcomm wireless modem chips. Other deployments includeautomotive infotainmentsystems.[13]

Apple A seriesprocessors beginning with theA7contain a Secure Enclavecoprocessorrunning an L4 operating system[14]called sepOS (Secure Enclave Processor OS) based on the L4-embedded kernel developed atNICTAin 2006.[15] As a result, L4 ships on all modern Apple devices including Macs withApple silicon.In 2015 alone, total shipments of iPhone was estimated at 310 million.[16]

High assurance: seL4[edit]

In 2006, theNICTAgroup commenced a from-scratch design of athird-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 ofCommon Criteriaand beyond. From the beginning, development aimed forformal verificationof the kernel. To ease meeting the sometimes conflicting requirements of performance and verification, the team used amiddle-outsoftware process starting from an executablespecificationwritten in the languageHaskell.[17] seL4 usescapability-based securityaccess control to enable formal reasoning about object accessibility.

Aformal proofof functional correctness was completed in 2009.[18] 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 asdeadlocks,livelocks,buffer overflows,arithmetic exceptions or use ofuninitialised variables.seL4 is claimed to be the first-ever general-purpose operating-system kernel that has been verified.[18]The work on seL4 won the 2019ACM SIGOPSHall of Fame Award.

seL4 takes a novel approach to kernel resource management,[19]exporting the management of kernel resources to user level and subjects them to the samecapability-basedaccess control as user resources. This model, which was also adopted byBarrelfish,simplifies reasoning about isolation properties, and was an enabler for later proofs that seL4 enforces the core security properties of integrity and confidentiality.[20]The NICTA team also proved correctness of the translation from the programming languageCto executablemachine code,taking thecompilerout of thetrusted computing baseof seL4.[21] 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 soundworst-case execution time(WCET) analysis, a prerequisite for its use in hardreal-time computing.[20]

On 29 July 2014,NICTAandGeneral Dynamics C4 Systemsannounced that seL4, with end to end proofs, was now released underopen-source licenses.[22] The kernelsource codeand proofs arelicensedunderGNU General Public License version 2(GPLv2), and mostlibrariesandtoolsare under theBSD 2-clause.In April 2020, it was announced that the seL4 Foundation was created under the umbrella of theLinux Foundationto accelerate development and deployment of seL4.[23]

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.[24]Specifically, the cost of oneline of codeduring the development of seL4 was estimated at aroundUS$400,compared toUS$1,000for traditional high-assurance systems.[25]

Under the Defense Advanced Research Projects Agency (DARPA) High-Assurance Cyber Military Systems (HACMS) program, NICTA together with project partnersRockwell Collins,Galois Inc, theUniversity of MinnesotaandBoeingdeveloped a high-assurance drone using seL4, along with other assurance tools and software, with planned technology transfer onto the optionally piloted autonomousBoeing AH-6Unmanned Little Bird helicopter being developed by Boeing. Final demonstration of the HACMS technology took place in Sterling, VA in April 2017.[26]DARPA also funded severalSmall Business Innovative Research(SBIR) contracts related to seL4 under a program started by Dr.John Launchbury.Small businesses receiving an seL4-related SBIR included: DornerWorks, Techshot, Wearable Inc, Real Time Innovations, and Critical Technologies.[27]

In October 2023,Nio Inc.announced that their seL4-based SkyOS operating systemswill be in mass-produced electric cars from 2024.

In 2023, seL4 won theACM Software System Award.

Other research and development[edit]

Osker, an OS written inHaskell,targeted the L4 specification; although this project focused mainly on the use of afunctional programminglanguage for OS development, not on microkernel research.[28]

RedoxOS[29]is a Rust based operating system, that is also inspired by seL4, and uses a micro kernel design.

CodeZero[30]is an L4 microkernel for embedded systems with a focus on virtualization and implementation of native OS services. There is aGPL-licensed version,[31]and a version that was relicensed by B Labs Ltd., acquired byNvidia,as closed source and forked in 2010.[32][33]

F9 microkernel,[34]a BSD-licensed L4 implementation, is dedicated toARM Cortex-Mprocessors for deeply embedded devices with memory protection.

The NOVA OS Virtualization Architecture[35]is a research project with focus on constructing a secure and efficient virtualization environment[36][37] with a small trusted computing base. NOVA consists of a microhypervisor, a user levelhypervisor(virtual machinemonitor), 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[38]is areal-time operating systembased 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[39]) working on WrmOS.

Helios is a microkernel inspired by seL4.[40]It is part of the Ares operating system, supports x86-64 and aarch64 and is still under active development as of February 2023.[41]

See also[edit]

References[edit]

  1. ^abLiedtke, Jochen(December 1993)."Improving IPC by kernel design".14th ACM Symposium on Operating System Principles.Asheville, NC, USA. pp. 175–188.
  2. ^abcLiedtke, Jochen(December 1995)."On μ-Kernel Construction".Proceedings 15th ACM Symposium on Operating Systems Principles (SOSP).pp. 237–250.Archivedfrom the original on 25 October 2015.
  3. ^"Hypervisor Products: General Dynamics Mission Systems".General Dynamics Mission Systems.Archivedfrom the original on 15 November 2017.Retrieved26 April2018.
  4. ^ab "Open Kernel Labs Software Surpasses Milestone of 1.5 Billion Mobile Device Shipments"(Press release).Open Kernel Labs.19 January 2012. Archived fromthe originalon 11 February 2012.
  5. ^Gefflaut, Alain; Jaeger, Trent; Park, Yoonho;Liedtke, Jochen;Elphinstone, Kevin; Uhlig, Volkmar; Tidswell, Jonathon; Deller, Luke; Reuther, Lars (2000)."The Sawmill multiserver approach".ACM SIGOPS European Workshop.Kolding, Denmark. pp. 109–114.
  6. ^"DROPS – Overview".Dresden University of Technology.Archivedfrom the original on 7 August 2011.Retrieved10 August2011.
  7. ^l4ka.org: L4Ka::Pistachio microkernelQuote: "...The variety of supported architctures makes L4Ka::Pistachio an ideal research and development platform for a wide variety of systems..."
  8. ^Gray, Charles; Chapman, Matthew; Chubb, Peter; Mosberger-Tang, David;Heiser, Gernot(April 2005)."Itanium: A system implementor's tale".USENIX Annual Technical Conference.Annaheim, CA, USA. pp. 264–278.Archivedfrom the original on 17 February 2007.
  9. ^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.20(5): 654–664.CiteSeerX10.1.1.59.6766.doi:10.1007/s11390-005-0654-4.S2CID1121537.
  10. ^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.Sydney, Australia:NICTA.pp. 11–21.Archivedfrom the original on 1 March 2015.Retrieved25 October2015.
  11. ^Ruocco, Sergio (October 2008). "A Real-Time Programmer's Tour of General-Purpose L4 Microkernels".EURASIP Journal on Embedded Systems.2008:1–14.doi:10.1155/2008/234710(inactive 29 June 2024).S2CID7430332.{{cite journal}}:CS1 maint: DOI inactive as of June 2024 (link)
  12. ^ "NICTA L4 Microkernel to be Utilised in Select QUALCOMM Chipset Solutions"(Press release).NICTA.24 November 2005. Archived fromthe originalon 25 August 2006.
  13. ^ "Open Kernel Labs Automotive Virtualization Selected by Bosch for Infotainment Systems"(Press release).Open Kernel Labs.27 March 2012. Archived fromthe originalon 2 July 2012.
  14. ^"iOS Security, iOS 12.3"(PDF).Apple Inc. May 2019.Archived(PDF)from the original on 24 June 2020.
  15. ^ Mandt, Tarjei; Solnik, Mathew; Wang, David (31 July 2016)."Demystifying the Secure Enclave Processor"(PDF).BlackHat USA.Las Vegas, Nevada, USA.Archived(PDF)from the original on 21 October 2016.
  16. ^ Elmer-DeWitt, Philip (28 October 2014)."Forecast: Apple will ship 310 million iOS devices in 2015".Fortune.Archivedfrom the original on 27 September 2015.Retrieved25 October2015.
  17. ^ 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.Portland, Oregon.pp. 60–71.
  18. ^ab Klein, Gerwin; Elphinstone, Kevin;Heiser, Gernot;Andronick, June; Cock, David; Derrin, Philip; Elkaduwe, Dhammika; Engelhardt, Kai; Kolanski, Rafal; Norrish, Michael; Sewell, Thomas; Tuch, Harvey; Winwood, Simon (October 2009)."seL4: Formal verification of an OS kernel"(PDF).22nd ACM Symposium on Operating System Principles.Big Sky, MT, USA.Archived(PDF)from the original on 28 July 2011.
  19. ^ Elkaduwe, Dhammika; Derrin, Philip; Elphinstone, Kevin (April 2008).Kernel design for isolation and assurance of physical memory.1st Workshop on Isolation and Integration in Embedded Systems. Glasgow, UK.doi:10.1145/1435458.Archived fromthe originalon 22 February 2020.Retrieved22 February2020.
  20. ^ab Klein, Gerwin; Andronick, June; Elphinstone, Kevin; Murray, Toby; Sewell, Thomas; Kolanski, Rafal;Heiser, Gernot(February 2014). "Comprehensive Formal Verification of an OS Microkernel".ACM Transactions on Computer Systems.32(1): 2:1–2:70.CiteSeerX10.1.1.431.9140.doi:10.1145/2560537.S2CID4474342.
  21. ^Sewell, Thomas; Myreen, Magnus; Klein, Gerwin (June 2013)."Translation Validation for a Verified OS Kernel".ACM SIGPLAN Conference on Programming Language Design and Implementation.Seattle, WA, USA.doi:10.1145/2491956.2462183.
  22. ^ "Secure operating system developed by NICTA goes open source"(Press release).NICTA.29 July 2014.Archivedfrom the original on 15 March 2016.
  23. ^ "Security Gets Support of Linux Foundation"(Press release).Linux Foundation.7 April 2020.Archivedfrom the original on 15 March 2016.
  24. ^Klein, Gerwin; Andronick, June; Elphinstone, Kevin; Murray, Toby; Sewell, Thomas; Kolanski, Rafal;Heiser, Gernot(2014)."Comprehensive formal verification of an OS microkernel"(PDF).ACM Transactions on Computer Systems.32:64.CiteSeerX10.1.1.431.9140.doi:10.1145/2560537.S2CID4474342.Archived(PDF)from the original on 3 August 2014.
  25. ^Heiser, Gernot(16 January 2015).seL4 Is Free: What Does This Mean for You?.Auckland, New Zealand: Linux.conf.au.
  26. ^ "DARPA selects Rockwell Collins to apply cybersecurity technology to new platforms"(Press release).Rockwell Collins.24 April 2017.Archivedfrom the original on 11 May 2017.
  27. ^ "DARPA Agency Sponsor Dr. John Launchbury".SBIRSource.2017.Archivedfrom the original on 29 September 2017.Retrieved16 May2017.
  28. ^ Hallgren, T.; Jones, M.P.; Leslie, R.; Tolmach, A. (2005)."A principled approach to operating system construction in Haskell"(PDF).ACM SIGPLAN Notices.40(9): 116–128.doi:10.1145/1090189.1086380.ISSN0362-1340.Archived(PDF)from the original on 15 June 2010.Retrieved24 June2010.
  29. ^"RedoxOS".RedoxOS.
  30. ^"Announce: Introducing Codezero".Dresden University of Technology.
  31. ^"jserv/codezero: Codezero Microkernel".GitHub.Archivedfrom the original on 15 August 2015.Retrieved20 October2020.
  32. ^"Code Zero: Embedded Hypervisor and OS".Archived fromthe originalon 11 January 2016.Retrieved25 January2016.
  33. ^"B Labs | Mobile Virtualization solutions, Android and Linux virtualization for the ARM architecture".Archived fromthe originalon 2 February 2014.Retrieved2 February2014.
  34. ^"F9 Microkernel".GitHub.Retrieved20 October2020.
  35. ^"NOVA Microhypervisor website".Retrieved9 January2021.
  36. ^ Steinberg, Udo; Kauer, Bernhard (April 2010). "NOVA: A Microhypervisor-Based Secure Virtualization Architecture".EuroSys '10: Proceedings of the 5th European Conference on Computer Systems.Paris, France.
  37. ^ Steinberg, Udo; Kauer, Bernhard (April 2010). "Towards a Scalable Multiprocessor User-level Environment".IIDS'10: Workshop on Isolation and Integration for Dependable Systems.Paris, France.
  38. ^"WrmOS".Retrieved20 October2020.
  39. ^"w4linux is paravirtualized Linux kernel working on WrmOS".Retrieved20 October2020.
  40. ^"~sircmpwn/helios – An experimental microkernel – sourcehut git".git.sr.ht.Retrieved20 February2023.
  41. ^"Helios".ares-os.org.Retrieved20 February2023.

Further reading[edit]

External links[edit]