-
The Microkernel that agreed with Linus Torvalds
That infamous discussion between Tanenbaum and Linus, is a funny-regrettable moment in the computer history. To me, a particularly revealing exchange concerned MINIX’s portability. Tanenbaum argued that Linux was excessively dependent on the Intel 80386 and that tying an operating system to one processor architecture was a questionable design decision. Torvalds responded by questioning the…
-
You think RK0 services overlap? Look again.
Same Verbs, Different Contracts Look at the RK0 API quickly, and one objection is almost immediate. Why are there so many synchronisation/communication mechanisms? Self-Suspension, Event Flags, Semaphores, Locks, Sleep Queues, Exchange Mailboxes, Message Queues, Named Queues… At first glance, several of these facilities seem like variations of the same thing. Why not provide one sufficiently…
-
Benchmarking RK0: zero surprises
Quoth the raven: because so. In real time, we want computation results with a bounded upper response time; the ThreadX benchmark are throughput measurements. They help to correlate results with deterministic behaviour for each mechanism in that scenario. You can’t treat each design under test as a black box and ignore the testbench. Hardly doable…
-
If Everything Is an Event, Nothing Is: How the RK0 Real-Time Model Impacts the Design
Electronics Technology Delivers Timeliness… … and the overlaying software abstractions discard it. Edward Lee, 2006 If this is your first contact with RK0, its design premise can be stated simply: Overgeneralisation hides information from the kernel and leaves the application to handle the worst cases. Semaphores, queues and mutexes are useful mechanisms, and RK0 provides…
-
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
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 and a protected predicate retain different information and complete at different points.…
-
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 (global) Priority Ceiling used in deterministic profiles, locks can use Priority Inheritance Protocol (with a fully transitive implementation) (preferable) or Immediate Ceiling. Immediate Ceiling is optionally used in asynchronous named Message-passing as well. I want to explain why I…
-
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…
-
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…
-
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…
