# Real-time operating systems

An RTOS adds tasks, priorities and predictable scheduling to a microcontroller, so deadlines can be met. Real-time means predictable timing, not raw speed.

Page: https://dharanova.com/learn/rtos · Track: Run · Level: Core · Facts last checked 6 October 2026

Read first: [Bare metal: the super-loop and interrupts](https://dharanova.com/learn/bare-metal.md)

Diagram: Top timeline with high, medium and low priority tasks. Low is running when High becomes ready and pre-empts it at once. Medium becomes ready while High runs, waits, and runs next; Low resumes last. Bottom timeline, priority inversion: Low holds a shared resource. High pre-empts Low, then has to wait for that resource. While it waits, Medium pre-empts Low, so the resource stays held even longer, and High runs only after Low releases it. A note says mutexes with priority inheritance limit this delay but do not remove it.

## Key points

1. Real-time means meeting known deadlines: predictable timing, not raw speed. A pre-emptive scheduler always runs the most important task that is ready, so critical work does not wait behind less important tasks, except when they share a resource. [1][2]
2. Widely used open-source RTOSes include FreeRTOS (MIT licence), Zephyr (Apache 2.0, a Linux Foundation project), Eclipse ThreadX (MIT licence), Apache NuttX (Apache 2.0) and RIOT (LGPL 2.1). (as of 6 October 2026) [3][4][5][6][7]
3. ThreadX, which Microsoft offered as part of its Azure RTOS suite, was contributed to the Eclipse Foundation in November 2023 and relicensed under MIT as Eclipse ThreadX, which remains actively released. (as of 6 October 2026) [5][8]
4. Priority inversion happens when a high-priority task waits for a resource held by a lower-priority task, and gets worse if a medium-priority task interrupts the holder. Mutexes with priority inheritance limit the delay but do not remove it, so it also helps to share less. [1][9]

## Sources

1. [Mastering the FreeRTOS Real Time Kernel (FreeRTOS Kernel Book)](https://github.com/FreeRTOS/FreeRTOS-Kernel-Book), FreeRTOS (AWS)
2. [FreeRTOS: RTOS fundamentals](https://www.freertos.org/Documentation/01-FreeRTOS-quick-start/01-Beginners-guide/01-RTOS-fundamentals), FreeRTOS (AWS)
3. [FreeRTOS-Kernel LICENSE.md (MIT)](https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/LICENSE.md), FreeRTOS (AWS)
4. [Zephyr Project: learn about](https://www.zephyrproject.org/learn-about/), Zephyr Project (Linux Foundation)
5. [Eclipse ThreadX project page](https://projects.eclipse.org/projects/iot.threadx), Eclipse Foundation
6. [Apache NuttX](https://nuttx.apache.org/), Apache Software Foundation
7. [RIOT OS](https://www.riot-os.org/), RIOT community
8. [Introducing Eclipse ThreadX (21 November 2023)](https://eclipse-foundation.blog/2023/11/21/introducing-eclipse-threadx/), Eclipse Foundation
9. [FreeRTOS: Mutexes](https://www.freertos.org/Documentation/02-Kernel/02-Kernel-features/02-Queues-mutexes-and-semaphores/04-Mutexes), FreeRTOS (AWS)
