You Don't Need an RTOS (Part 1)
In this first article, we'll compare our two contenders, the superloop and the RTOS. We'll define a few terms that help us describe exactly what functions a scheduler does and why an RTOS can help make certain systems work that wouldn't with a superloop. By the end of this article, you'll be able to: - Measure or calculate the deadlines, periods, and worst-case execution times for each task in your system, - Determine, using either a response-time analysis or a utilization test, if that set of tasks is schedulable using either a superloop or an RTOS, and - Assign RTOS task priorities optimally.
Summary
This article compares the superloop (bare-metal) approach with an RTOS-based design, defining scheduler responsibilities and where each model succeeds or fails. Readers will learn how to quantify task timing (deadlines, periods, WCET), run schedulability analyses, and choose and tune priorities for RTOS tasks.
Key Takeaways
- Measure or calculate task deadlines, periods, and worst-case execution times (WCET) for each system function
- Determine schedulability using response-time analysis (RTA) or utilization-based tests
- Evaluate whether a superloop or an RTOS is appropriate for a given task set and timing constraints
- Assign RTOS task priorities optimally using schedulability results and priority-assignment rules
Who Should Read This
Embedded firmware engineers and system designers (intermediate experience) deciding whether to use a superloop or an RTOS for microcontroller real-time systems.
Still RelevantIntermediate
Related Documents
- Consistent Overhead Byte Stuffing TimelessIntermediate
- PID Without a PhD TimelessIntermediate
- Introduction to Embedded Systems - A Cyber-Physical Systems Approach Still RelevantIntermediate
- Can an RTOS be really real-time? TimelessAdvanced
- Memory Mapped I/O in C TimelessIntermediate








