Why it exists
A brake controller must run its control loop every few milliseconds — always. General-purpose operating systems optimise average performance; real-time operating systems guarantee worst-case timing.
What it is
- Static configuration: all tasks and their priorities are known at build time.
- Priority-based preemptive scheduling: the highest-priority ready task always runs.
- Protection: memory protection (via the MPU) and timing protection (budgets for tasks) isolate software partitions.
- Multi-core support: tasks are assigned to cores; inter-core communication is explicit.
Best practices
- Perform worst-case execution time and response-time analysis, not only measurements.
- Keep interrupt load bounded; move heavy work to tasks.
- Separate ASIL and QM software into different OS applications with memory protection.
Common pitfalls
- Shared resources without proper locking, causing priority inversion.