Skip to content
RK0 – Embedded Real-Time Kernel '0’

RK0 – Embedded Real-Time Kernel '0’

Real-Time. Zero surprises.

  • 📖 Docbook
  • ✏️Blog
  • 💾Code
  • 🗂️ Wiki
  • RK01: user/kernel and memory-domain boundaries

    RK0 with one more boundary made explicit. When I wrote my first preemptive scheduler, the entire system amounted to context switching under a time slice. Literally the next day, I started trying to split user space from kernel space. After all, it was a kernel, not a library. Which respectable kernel could exist without that…

  • Active Objects in RK0: Asynchronous Behaviour with Direct Messages

    The Active Object pattern separates the invocation of an operation from its execution. Instead of calling directly into an object that might be concurrently accessed, a client submits a request and continues. The object owns its thread of control and executes requests sequentially in that thread. That is the essential distinction made in the original Active Object pattern:…

  • About generalisation and gospel

    While reusing for the sake of reusing is not always technically wise, when software evolution is a top concern, as in Software Product Lines, the first question to be answered is: what is common? It has been a long time since Parnas (on a balanced approach) coined the idea that was eventually classified as the Dependency…

  • Four similar coordination models, but not really

    Semaphores, Condition Variables, Mailboxes and Synchronous Message Passing to implement a Barrier A Barrier is relation among activities: no participant may continue beyond a phase boundary until every required participant has arrived: Mutual Coincidence. That relation can be represented in several ways. The representation matters because a Semaphore token, a queued record, a synchronous copy…

  • Communicating Sequential Processes, Cooperating Sequential Processes, and the RK0 thing

    Dijkstra and Hoare did not separate concurrency into distinct domains of synchronisation and communication. Dijkstra addressed communication via shared state and synchronising operations, whereas Hoare established interaction as the foundation of a compositional behavioural model. The similar names Cooperating Sequential Processes and Communicating Sequential Processes may suggest a misleading contrast: that Dijkstra’s processes synchronise while…

  • Design Decisions: Why RK0 chose not to implement PCP

    RK0 is a kernel designed for determinism, with priority inversion as a main scheduling concern. Instead of the more common Priority Ceiling used in deterministic profiles, it uses the Priority Inheritance Protocol (with a fully transitive implementation). I want to explain why I made this choice, even though it is not set in stone. Why…

  • Sleep Primitives in RK0 and their differences

    RK0 provides a fair amount of sleep primitives, each one tailored for a different concurrency demand. kSleepDelay(t) — Sleep for at least t ticks The Idea: It’s a straightforward time‑blocking primitive. The task voluntarily gives up the processor and tells the kernel: “Take me out of the RUNNING state and put me in SLEEPING for…

  • RK0: a Software Engineering Perspective

    The design take Real-time kernels are frequently presented as a set of primitives: semaphores, queues, mutexes, event flags, timers, and notifications. Normally, they are generic enough and sometimes overloaded. RK0 adopts a different premise. Services are shaped (from internals to API), so they explicitly express how they impact runtime progress. The application programmer declares the…

  • Real-Time Model and Service Map in RK0

    Recently, the real-time model used in RK0 and how it is reflected in the design choices was written down. RK0 is centred on the idea that concurrency needs are the unique commonality preserved across real-time systems, and therefore the kernel provides generic services that are just enough for the application to compose for its demands,…

  • Transitive Priority Inheritance on RK0 Mutexes

    RK0 maintains the invariant that every mutex owner executes at the highest effective priority of any task it blocks, whether the dependency is direct or transitive, and recomputes that priority whenever the dependency graph changes. Priority inversion is a killer in real-time systems. It happens when a (TL) less-urgent task acquires a critical region before…

  • RFC: About Real-Time, Responsiveness and Throughput

    I was reading a book provided by a mainstream real-time kernel (which I acknowledge as high-quality). When discussing time-slicing and periodic tasks, the book notes that not using time-slicing would result in decreased fairness for tasks with the same priority, and therefore, it is an ‘advanced technique’. I disagree with the term ‘advanced‘; I would…

  • About the Building System: How RK0 Gets Up and Running

    This blog complements the earlier post “About Processes, Tasks and Threads”. That explained what runs in RK0; this one explains how the toolchain arranges it. In constrained systems such as those targeted by RK0, the boundary between software and hardware is blurry. The linker decides exactly where every byte of code or data will reside, and the start‑up…

  • About Processes, Tasks and Threads

    This blog provides a clear distinction on these terms often used interchangeably. Execution Image An execution image generated after compiling, assembling, and linking a C program has the following sections: These sections are statically allocated—that is, after creating the image, the addresses for the objects contained in the text, data, and bss sections are already…

  • Mail
  • LinkedIn

Copyright © 2026 Antonio Giacomelli

Loading Comments...