The article details the design of a custom operating system built in Rust to explore novel OS concepts. The author explains the motivation for moving away from traditional concurrency models, which rely on shared state and are prone to difficult-to-debug errors. The core proposal is the actor model, a paradigm originating from a 1973 paper where the fundamental unit is the "actor," which operates independently with its own mailbox and communicates solely through message passing. This approach avoids shared state entirely, allowing developers to reason about system components in isolation. Using a concrete example, the author describes how a user's keystroke travels through a chain of specialized actors — from keyboard input to the window manager and finally to a console application. Similarly, network operations are handled by a distinct stack of actors. The system is structured so that modules are ELF binaries with type metadata, enabling serialization, migration, and the ability to hot-swap modules without data loss. By leveraging Rust's macro system, the OS generates necessary metadata automatically. The ultimate goal is a threadless concurrency model that eliminates locks, enforces strong data partitioning, and supports dynamic module updates while maintaining system state.
The actor model simplifies system design by treating every component as an independent entity communicating via messages. This architecture allows for the hot-swapping of modules and provides a robust framework for building complex, concurrent systems without the typical pitfalls of shared memory. The design philosophy centers on isolation and message passing as the primary mechanisms for interaction.
Source: Hacker News · Summarized by HeadlinesBriefing