← back to projects
systems project

cerberus-os

language: Rust · no_stdhardware: RISC-V (RV32IMAC)status: In development

motivation

I wanted to understand what safety-critical RTOS design actually requires — not at the API level, but at the level of hardware guarantees. The only way to know is to build it.

what it does

A high-integrity bare-metal micro-RTOS for automotive ECUs on RISC-V (RV32IMAC). Hardware-enforced task isolation via Physical Memory Protection (PMP), deterministic O(1) priority scheduling with a bitmap-based ready queue, Priority Inheritance Mutexes to prevent priority inversion, exception containment, CAN bus packet ingestion, and AUTOSAR-style logical watchdog threads. Designed to IEC 61508 / ISO 26262 functional safety principles.

technical detail

The hardest part was the Priority Inheritance Mutex. PMP configuration on every context switch adds 2-4 CSR writes of overhead per task switch — measurable but acceptable given the isolation guarantee: a faulting task cannot corrupt another task's memory, enforced by silicon, not software.

technology used

Rust
no_std
RV32IMAC
PMP
RTIC concepts
IEC 61508
ISO 26262
CAN bus