Skip to main navigation Skip to search Skip to main content

Rust for Real-Time Operating Systems
: Implementation, Testing and Evaluation

  • Jakob Jungreuthmayer

    Student thesis: Master's Thesis

    Abstract

    Real-time operating systems for resource-constrained embedded devices are predomi
    nantly implemented in C, a memory-unsafe language responsible for a large share of
    reported security vulnerabilities. In contrast, Rust establishes memory and concurrency
    safety at compile time, preserving low-level control and independence from a runtime.
    Real-time operating systems written in Rust nevertheless remain few, and no compre
    hensive evaluation covers them along several axes at once. Such axes are the comparison
    of established real-time operating systems written in Rust and in C, of the execution
    models used in embedded Rust and of minimal kernels of equal scope in both languages,
    together with a qualitative assessment of the language guarantees and their limits. Rust
    is therefore evaluated in this thesis as a programming language for the design of real-time
    operating systems.
    A minimal preemptive kernel is developed in Rust as the basis of the evaluation. Task
    management, priority-based scheduling, synchronization and communication, software
    timers and instrumentation are provided, with memory reserved statically. Hardware
    dependent code is confined to an architecture layer with ports for the Cortex-M processor
    family and the RISC-V architecture. Testing forms part of the development, with unit
    and integration testing, complemented by coverage and mutation testing, as well as
    static and dynamic analysis of the kernel. The developed prototype thereby demonstrates
    approaches to the implementation and testing of a minimal real-time operating system
    in Rust.
    Against established real-time operating systems the implementation language itself
    does not order the measured field, although the fastest kernels are written in C. Compared
    with other Rust execution models, the operating system model costs memory and response
    to external events, in return for bounded jitter under load. Measured against a real-time
    operating system of equal scope written in C, Rust shows higher memory requirements,
    whereas the cost of the kernel itself differs less than the toolchain and the application
    code around it. Neither language proves faster overall, since the results favor each of them
    in different cases. The contribution of Rust for real-time operating systems therefore
    appears in qualitative properties established at compile time, such as memory safety,
    concurrency safety and interface correctness, rather than in quantitative measurements.
    However, these guarantees do not cover unsafe code, which a kernel cannot avoid and
    whose invariants must be upheld manually. Furthermore, properties such as timeliness,
    functional correctness and task isolation remain outside what the language enforces.
    Date of Award2026
    Original languageEnglish (American)
    Awarding Institution
    • FH OÖ
    SupervisorJosef Langer (Supervisor)

    Studyprogram

    • Embedded Systems Design

    Cite this

    '