Rate-monotonic scheduling

Rate Monotonic Scheduling (RMS) is a fixed-priority preemptive scheduling algorithm used in real-time operating systems. It assigns higher priorities to tasks with shorter periods, making it optimal for meeting deadlines when tasks have periods equal to their deadlines.

How Rate Monotonic Scheduling Works

The algorithm follows a simple rule: tasks with shorter periods receive higher priorities. These priorities remain fixed throughout execution, making RMS a static priority scheduling algorithm. When a higher-priority task becomes ready, it preempts any currently running lower-priority task.

Rate Monotonic Priority Assignment Task A (Period=5) Task B (Period=10) Task C (Period=20) High Medium Low Priority assigned based on period: Shorter period = Higher priority

Key Properties

  • Static priority assignment Priorities are determined before execution and remain unchanged.

  • Preemptive scheduling Higher priority tasks can interrupt lower priority tasks.

  • Independent tasks Tasks do not share resources or have dependencies.

  • Periodic execution Each task has a fixed period and deadline equal to its period.

Schedulability Analysis

For a set of n tasks to be schedulable under RMS, the total CPU utilization must satisfy:

U = ?(Ci/Ti) ? n(2^(1/n) - 1)

Where:

  • Ci Computation time of task i

  • Ti Period of task i

  • n Number of tasks

  • U Total CPU utilization

As n approaches infinity, the bound approaches approximately 69.3%. This means RMS can guarantee schedulability when CPU utilization stays below 70%.

Example

Consider three tasks with their computation times and periods:

Task Computation Time (Ci) Period (Ti) Priority
T1 2 5 Highest
T2 1 7 Medium
T3 2 10 Lowest

Step 1: Calculate total utilization

U = 2/5 + 1/7 + 2/10 = 0.4 + 0.143 + 0.2 = 0.743

Step 2: Calculate RMS bound for n=3 tasks

U_bound = 3(2^(1/3) - 1) = 3(1.26 - 1) = 0.78

Result: Since 0.743 < 0.78, the task set is schedulable under RMS.

Advantages and Disadvantages

Advantages Disadvantages
Simple to implement Low CPU utilization (<70%)
Optimal for fixed priorities Requires independent tasks
Predictable behavior Not optimal when deadlines ? periods
Well-established theory May cause longer waiting times

Conclusion

Rate Monotonic Scheduling is optimal among all fixed-priority algorithms for independent periodic tasks with deadlines equal to periods. While it guarantees schedulability up to 70% CPU utilization, its simplicity and predictable behavior make it widely used in real-time systems despite the utilization limitation.

Updated on: 2026-03-17T09:01:39+05:30

5K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements