Rate-monotonic scheduling (RMS) is a fixed-priority scheduling policy for real-time systems in which tasks with shorter periods are given higher priority. It is the standard way to assign priorities to periodic tasks on a real-time operating system, and it comes with a simple test that tells you, before the system runs, whether every task will meet its deadline.
The problem RMS solves
An embedded controller runs several periodic jobs: read a sensor every 2 ms, run a control loop every 10 ms, update a display every 50 ms, send telemetry every 500 ms. Each must finish before its next instance starts. On a pre-emptive RTOS you assign each task a priority; the question is which priority order guarantees that none of them misses a deadline.
The rule
Assign priorities in order of period: the task with the shortest period gets the highest priority. The 2 ms task runs at the top, then 10 ms, then 50 ms, then 500 ms. For tasks whose deadline equals their period, this ordering is optimal among fixed-priority schemes: if any fixed-priority assignment can meet all deadlines, the rate-monotonic one can.
The schedulability test
For n periodic, independent tasks with computation time Ci and period Ti, define utilisation U = Σ Ci/Ti. The Liu and Layland bound says all deadlines are met if:
U ≤ n (21/n − 1)
| n tasks | Bound |
|---|---|
| 1 | 100% |
| 2 | 82.8% |
| 3 | 78.0% |
| 4 | 75.7% |
| ∞ | 69.3% (ln 2) |
The bound is sufficient, not necessary: a task set above the bound may still be schedulable, and an exact response-time analysis can confirm it. Below the bound you are guaranteed safe.
Worked example
| Task | Period T (ms) | Execution C (ms) | C/T | RMS priority |
|---|---|---|---|---|
| Sensor read | 2 | 0.3 | 0.150 | 1 (highest) |
| Control loop | 10 | 2.5 | 0.250 | 2 |
| Display | 50 | 8 | 0.160 | 3 |
| Telemetry | 500 | 40 | 0.080 | 4 (lowest) |
U = 0.640, below the four-task bound of 0.757, so every deadline is guaranteed under RMS. If the control loop grew to 5 ms (U = 0.89), the bound would be exceeded and a response-time analysis would be needed; in that case the telemetry task would be the one at risk.
Assumptions and what breaks them
- Tasks are periodic and independent. Shared resources protected by mutexes introduce blocking; use priority inheritance or priority ceiling protocols and add the worst-case blocking time to the analysis.
- Deadline equals period. If deadlines are shorter than periods, deadline-monotonic scheduling (priority by deadline) is the right variant.
- Zero context-switch cost. Real switches take microseconds; include them in Ci.
- Known worst-case execution times. Measure or analyse them; optimistic estimates make the whole analysis meaningless.
- Interrupts run above all tasks; treat their worst-case load as the highest-priority “task”.
RMS vs earliest-deadline-first (EDF)
EDF is a dynamic-priority policy that always runs the task with the nearest deadline and can use 100% of the processor. It is optimal in theory but has unpredictable behaviour under overload and is less commonly implemented in commercial RTOSes. RMS is simpler, predictable, degrades gracefully (low-priority tasks miss first) and is what most RTOS schedulers support natively, which is why it dominates in practice.
Applying RMS on a real RTOS
- List every periodic task with its period and measured worst-case execution time.
- Sort by period; assign priorities in that order (remember most RTOSes use higher number = higher priority, some the reverse).
- Compute U and compare with the bound; run response-time analysis if above it.
- Add blocking times from shared resources and interrupt load.
- Verify on hardware with timing instrumentation: measure actual response times against the analysis.
Task design, priorities and timing analysis are covered hands-on in our embedded systems course; see embedded operating systems for RTOS fundamentals and characteristics of embedded systems for why real-time constraints matter.
Frequently asked questions
What is rate-monotonic scheduling?
A fixed-priority real-time scheduling policy that gives higher priority to tasks with shorter periods.
What is the RMS utilisation bound?
n(21/n − 1), which approaches 69.3% as the number of tasks grows. A task set with total utilisation below the bound is guaranteed schedulable.
Is RMS optimal?
Among fixed-priority policies for periodic tasks with deadlines equal to periods, yes: if any fixed-priority assignment works, RMS works.
What is the difference between RMS and EDF?
RMS uses fixed priorities by period and is simple and predictable; EDF uses dynamic priorities by deadline and can reach full utilisation but behaves less predictably under overload.
What is priority inversion and how does it affect RMS?
A high-priority task blocked on a resource held by a low-priority task that is itself pre-empted by a medium-priority task. It breaks the RMS analysis unless priority inheritance or ceiling protocols are used and blocking time is accounted for.
Share your question in comments or talk to our mentor team for batch guidance.
Ask the Admin Team
Drop your basic question in comments: eligibility, prerequisites, tools, fee range, and placement support.
Our team reviews and responds regularly.
