Hasty Briefsbeta

Bilingual

Hardware Is Asynchronous. Most of Our Operating Systems Still Aren't

3 days ago
  • #operating-systems
  • #async-programming
  • #systems-design
  • The author had a productive technical discussion about operating system design with Mohit D. Patel, who is building a Rust-based OS called CharlotteOS.
  • They explored the idea that hardware is fundamentally asynchronous, but most operating systems (like Unix/Linux) are built on a synchronous, blocking model.
  • Traditional OS designs retrofit asynchrony poorly, leading to complex solutions like io_uring in Linux, which resembles Windows NT's older completion-based I/O models.
  • Key primitives across systems (like file descriptors or handles) converge on being kernel-managed references for waiting on operations, highlighting universal design patterns.
  • An async-first OS would make asynchrony the default, using lightweight threads and upcalls (like scheduler activations) to reduce overhead and complexity.
  • Such a design could eliminate workarounds like thread pools and async-signal-safety rules, but introduces challenges in cancellation, backpressure, and safety.
  • Building a new OS from scratch faces significant hurdles, including lack of ecosystem, driver support, and dealing with complex standards like ACPI.
  • The author sees value in exploring async-first designs to challenge longstanding assumptions, even if the project doesn't ship, as it can reveal insights incremental changes miss.