A real-time system has three tasks with periods of 5 ms, 10 ms, and 20 ms. Under Rate-Monotonic Scheduling, which task gets the highest priority?
AThe task with period 20 ms, because it has the most slack time
BThe task with period 5 ms, because it runs most frequently and has the tightest constraints
CThey share equal priority since RMS is a dynamic algorithm
DPriority depends on execution time, not period length
RMS assigns priority inversely proportional to period length: shorter period = higher priority. A task with a 5 ms period runs 4 times as often as the 20 ms task, meaning its deadline arrives far more frequently. RMS's insight is that frequency is a proxy for urgency. Priorities are assigned once at design time (static), not dynamically. The 5 ms task gets highest priority, 10 ms gets medium, 20 ms gets lowest.
Question 2 Multiple Choice
A real-time system's total CPU utilization is 85%. Which scheduling algorithm can guarantee all deadlines are met, and which cannot?
ABoth RMS and EDF can guarantee deadlines at 85% utilization
BNeither RMS nor EDF can guarantee deadlines above 69% utilization
CEDF can guarantee deadlines (up to 100% utilization); RMS cannot guarantee them at 85%
DRMS can guarantee deadlines; EDF cannot handle utilization above 80%
EDF is optimal for single-processor real-time systems — it can schedule any feasible task set up to 100% CPU utilization. At 85%, EDF guarantees all deadlines will be met. RMS, by contrast, has a schedulability bound of approximately 69% (for large numbers of tasks). At 85% utilization, RMS cannot guarantee all deadlines — some task sets at this utilization will be schedulable by EDF but will miss deadlines under RMS. The 69% bound is conservative: many specific task sets work above it with RMS, but there is no general guarantee.
Question 3 True / False
EDF is preferred over RMS for safety-critical embedded systems like aircraft flight controllers because it can utilize 100% of CPU capacity.
TTrue
FFalse
Answer: False
Despite EDF's theoretical optimality, safety-critical systems like avionics and medical devices typically prefer RMS. The reason is predictability under overload: when a system becomes overloaded, RMS fails gracefully — low-priority (long-period) tasks miss deadlines while high-priority (short-period) tasks continue to meet theirs. EDF under overload fails chaotically — many tasks miss deadlines unpredictably. Safety-critical systems are designed with utilization well below 69%, sacrificing CPU efficiency in exchange for analyzable, certifiable behavior.
Question 4 True / False
Rate-Monotonic Scheduling is a dynamic priority algorithm that reassigns priorities whenever task periods change.
TTrue
FFalse
Answer: False
RMS is a static priority algorithm — priorities are assigned once at system design time based on task periods and never change at runtime. A task with period 5 ms always has higher priority than one with period 20 ms, even if the 20 ms task is currently closer to its deadline. This static assignment is what makes RMS simple to implement and easy to analyze for certification. EDF, by contrast, is the dynamic algorithm that continuously evaluates which task has the nearest deadline and adjusts priorities accordingly.
Question 5 Short Answer
Why do real-time systems often operate with CPU utilization well below the schedulability bound, even when they could theoretically run higher?
Think about your answer, then reveal below.
Model answer: Keeping utilization well below the bound provides margin for transient overloads, measurement errors in execution times, and unanticipated tasks or interrupts. Real-world task execution times are estimates — actual execution can vary, and worst-case estimates are conservative. Operating below the bound ensures that even in adverse conditions, deadlines are still met. For safety-critical applications, the cost of a missed deadline (a plane crash, a failed drug infusion) far outweighs the cost of leaving CPU cycles unused.
This reflects the broader engineering principle that safety margins matter more than theoretical efficiency when failures have catastrophic consequences. The schedulability bound assumes worst-case execution times and perfectly periodic tasks — conditions that may not hold in practice. A real system running at 50% utilization with RMS has headroom to absorb reality; one running at 68% is betting that worst-case never actually occurs.