Fast, Secure, Adaptable: LionsOS Design, Implementation and Performance

Gernot Heiser, Ivan Velickovic, Peter Chubb · 2025

Read Fast, Secure, Adaptable: LionsOS Design, Implementation and Performance by Gernot Heiser, Ivan Velickovic, Peter Chubb (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2501-06234.txt.

Introduction

Heiser and colleagues presented LionsOS in twenty twenty-five. LionsOS is an operating system for embedded devices where security and safety are critical. It is built on seL4. That microkernel has been proven correct with formal mathematics. The design keeps such proof in mind from the start.

LionsOS uses a static architecture, fixed at build time. Its structure is highly modular, with strict separation of concerns and a focus on simplicity. Fewer moving parts make it easier to prove properties and to audit the code. That matters for devices like medical or industrial controllers, where failure is costly. Despite the emphasis on assurance, the system achieves excellent performance on system-call-intensive workloads, the team reports. The paper describes the design, its implementation, and benchmark results.

Catalog record

CREATORGernot Heiser, Ivan Velickovic, Peter Chubb
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE60 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2501-06234

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Fast, Secure, Adaptable: LionsOS Design, Implementation and Performance Gernot Heiser, Ivan Velickovic, Peter Chubb Abstract Abstract We present LionsOS , an operating system for security- and safety-critical embedded systems. LionsOS is based on the formally verified seL4 microkernel and designed with verification in mind. It uses a static architecture and features a highly modular design driven by strict separation of concerns and a focus on simplicity. We demonstrate that LionsOS achieves excellent performance on system-call intensive workloads. 1 Introduction Safety- and security-critical systems, such as aircraft, autonomous cars, medical devices, industrial control or defence systems, require a highly dependable operating system (OS). The complexity (and code size) of these embedded/cyber-physical systems keeps growing, and it is unavoidable to have highly critical (and, presumably, highly assured) functionality co-exist with less critical (and less trustworthy) functionality. These systems are therefore mixed criticality systems (MCS), where the correct operation of a critical component must not depend on the correctness of a less critical component [ Barhorst et al. 2009 ; Burns and Davis 2017 ] . Traditional MCS are concerned with (spatial and temporal) integrity and availability . In modern systems the mixed-criticality requirement must also extend to confidentiality : Many cyberphysical systems, such as drones or medical devices, process sensitive data that must be protected. The core requirement such critical systems impose on the OS is therefore strong temporal and spatial isolation. As such, the seL4 microkernel [ seL4 Foundation 2021b ] seems a perfect foundation: seL4 has undergone extensive formal verification, including proofs of confidentiality and integrity enforcement, proof of implementation correctness and proofs that the binary has the same semantics as the verified C code, taking the compiler out of the trusted computing base (TCB) [ Klein et al. 2014 ] . It is the only formally-verified kernel that uses fine-grained access control through capabilities [ Dennis and Van Horn 1966 ] . There exists an MCS version of seL4 that provides the temporal isolation properties required by real-time systems [ Lyons et al. 2018 ] , verification of the MCS variant is currently in progress [ seL4 Foundation 2024 ] . These features have resulted in some real-world deployments, including autonomous military aircraft [ Cofer et al. 2018 ] and, more recently, commercial electric cars [ Qu 2024 ] . Yet more than a decade after seL4’s verification was completed, it is not widely deployed. The core reason behind this slow uptake seems to be the low-level nature of seL4, even lower than for most other microkernels. For example, seL4 makes management of all of a system’s physical memory (including the kernel’s) a user-level responsibility [ Elkaduwe et al. 2008 ] ; while this is a core enabler of reasoning about isolation, managing memory requires data structures (e.g. page tables) which require memory – a foot gun for developers. seL4 can be said to be the “assembly language of operating systems”. To build functional, performant systems on seL4 requires deep expertise – the kernel is largely unapproachable by industrial developers of critical systems, resulting in a number of seL4-based deployment projects apparently abandoned a few years after they started. In short, to benefit from seL4’s provable isolation enforcement, developers of critical systems need an actual operating system , providing appropriate abstractions, such as processes, files and network connections, while retaining (and extending) the isolation guarantees provided by seL4. We furthermore posit that such a system must be highly modular, in order to make best use of seL4-provided isolation for minimising the impact of faults, simplify identification and elimination of bugs, and enable end-to-end formal verification (eventually – for now we leave verification out of scope but aim for a verification-friendly design.) Fine-grained modularity results in many context switches and IPC operations; this overhead has traditionally been considered the Achilles heel of microkernels [ Bershad 1992 ] . Even very recent microkernel-based work co-locates services in larger modules and migrates functionality back into the kernel in order to achieve performance competitive with the monolithic Linux system [ Chen et al. 2024 ] . While such performance challenges may be real for a general-purpose OS system (eg. for smartphones), we aim to achieve a performant yet highly-modular OS for the embedded/cyberphysical space. Our contribution is to demonstrate • LionsOS , the first highly-modular microkernel-based OS that achieves performance at par or better than traditional monolithic designs; • which is enabled by a simplicity-oriented design employing use-case-specific policies . We present the principles of our approach ( Section 3 ), discuss the resulting design ( Section 4 ) and its implementation focussed on simplicity ( Section 5 ). We evaluate LionsOS performance against Linux and microkernel-based OSes and find that on context-switch intensive loads, which can be expected to show the highest modularity-imposed overheads, LionsOS outperforms all systems we compare against ( Section 6 ). 2 Background and Related Work 2.1 Verification and scalability The formal verification of seL4 demonstrated that it is possible to prove the implementation correctness of real-world systems of considerable complexity. However, the cost was high: about 12 person years of non-recurring engineering for 8,500 source lines of code (SLOC), and an estimated cost of $350/SLOC [ Klein et al. 2009 ] . While potentially justified for a stable, foundational piece of infrastructure, this cost is too high for most systems, especially a complete OS that will be significantly larger than seL4. The seL4 project delivered another key insight: Verification effort scales with the square of the specification size [ Matichuk et al. 2015 ] . This implies that there could be a large scalability benefit from keeping things small and simple, i.e. a highly modular design, where each component has a narrow interfaces and simple specification, and where module boundaries are enforced by seL4, making it possible to verify modules independently of each other. While seL4 used labour-intensive interactive theorem proving, recent work increasingly uses automated theorem proving techniques [ Sigurbjarnarson et al. 2016 ; Zaostrovnykh et al. 2017 ; Nelson et al. 2017 ; Nelson et al. 2019 ; Zaostrovnykh et al. 2019 ; Narayanan et al. 2020 ; Chen et al. 2023 ; Paturel et al. 2023 ; Cebeci et al. 2024 ] . These automated techniques are in essence based on (symbolic) state-space exploration with the help of heuristics to deal with combinatorial explosion. Yet they have severe limitations in the complexity of the code they can tackle, and will generally work best on simple and small modules. 2.2 Modularity in operating systems The idea of a modular OS with hardware-enforced module boundaries is old, going back to the original microkernel (before the term was coined), Brinch Hansen’s Nucleus [ Brinch Hansen 1970 ] . The approach was popularised by Mach [ Rashid et al. 1989 ] and taken up by other microkernel systems of the time, such as Chorus [ Rozier et al. 1988 ] and QNX [ Hildebrand 1992 ] . These systems were plagued by poor performance, and functionality moved back into the kernel [ Welch 1991 ] . This did not prevent expensive debacles, such as IBM’s ill-fated, Mach-based Workplace OS [ Fleisch et al. 1998 ] . Almost all microkernel-based OSes exhibited course-grained modularity, typically at the level of

Read the complete text