AdvancedTopic 77 of 104Electronics & Embedded
Real-time operating systems
Schedulers guarantee tasks meet deadlines.
In depth
An RTOS (FreeRTOS, Zephyr) schedules tasks with priorities and provides queues, semaphores, timers and deterministic latency. Tasks block on events instead of polling. Choose stack sizes carefully; measure worst-case execution time.
Key points
- Tick period
- Context switch time
- Hard vs soft real time
ExampleA drone's flight controller task runs at 1 kHz with highest priority.
A real-time operating system guarantees that critical tasks finish on time, which matters for control, safety and communication.
What is Real-time operating systems?
Schedulers guarantee tasks meet deadlines.
Why is it important to understand real-time operating systems?
A real-time operating system guarantees that critical tasks finish on time, which matters for control, safety and communication.
What is a hard real-time system?
A system where missing a deadline is a failure, such as in a brake controller, so timing must be guaranteed.
Is a general-purpose OS real-time?
Not usually, since it may not guarantee response times, so embedded RTOS or real-time Linux configurations are used where timing matters.
How is Real-time operating systems used in practice?
Typical applications include running a motor control loop and a user interface on the same microcontroller, meeting a deadline for a braking controller in a vehicle and managing several communication tasks with different priorities.
What should I learn before Real-time operating systems?
Study "Debugging tools" first (topic 76 of 104 in Electronics & Embedded). It covers the groundwork this topic builds on.
What are the key points of Real-time operating systems?
Tick period. Context switch time. Hard vs soft real time.
Can you give an example of Real-time operating systems?
A drone's flight controller task runs at 1 kHz with highest priority.
What comes after Real-time operating systems?
The next topic is "Task scheduling", which builds directly on this one.
How difficult is Real-time operating systems?
It is classed as Advanced in Electronics & Embedded (topic 77 of 104). It is an advanced topic. It assumes you are comfortable with the intermediate topics in Electronics & Embedded.