srvo

Real-time operating system (RTOS)

also: RTOS · bare-metal firmware · superloop

A lightweight operating system for microcontrollers that schedules tasks with predictable timing; the alternative is bare-metal code in a single main loop.

Simple firmware can run as a "superloop": read sensors, update outputs, repeat, with interrupts handling urgent events. As a product grows (wireless stack, user interface, logging, several control loops), juggling everything in one loop gets fragile. An RTOS splits work into tasks with priorities, so a time-critical control loop runs on schedule even while the radio is busy.

"Real-time" means predictable, not necessarily fast: the system is designed to respond within a known worst-case time. Several widely used RTOSes are open source; safety-certified options are usually commercial.

Where it bites: an RTOS adds memory use and new classes of bugs such as priority inversion, deadlocks and stack overflows. Wireless chip software stacks often require a particular RTOS, which can make the choice for you.

Founder takeaway

Ask which tasks have hard timing deadlines and how the firmware architecture guarantees them under worst-case load.

  engineer review pending

Ask an engineer