A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Real-Time Scheduling Algorithms

Graduate Depth 104 in the knowledge graph ☐ I know this ☆ Set as goal
415prerequisites beneath it
See this on the map →
Priority Scheduling AlgorithmsDisk Scheduling Algorithms+5 more→
scheduling real-time deterministic

Core Idea

Real-time systems require deterministic scheduling guarantees to meet task deadlines. Rate-Monotonic Scheduling (RMS) assigns priorities inversely to task period length, while Earliest Deadline First (EDF) dynamically selects the task nearest its deadline. Both algorithms have precise schedulability conditions and are used in safety-critical applications.

Explainer

From your study of priority scheduling, you know that assigning fixed priorities to processes determines who runs when the CPU is available. Real-time scheduling takes this idea and adds a critical constraint: every task has a deadline that must be met, or the system fails. Think of an anti-lock braking system — if the brake controller misses its 10-millisecond window to adjust pressure, the car doesn't stop safely. Unlike general-purpose scheduling where fairness and throughput matter most, real-time scheduling is about predictability and guarantees.

Rate-Monotonic Scheduling (RMS) is the simplest approach: assign higher priority to tasks that run more frequently. A task that repeats every 5 ms gets higher priority than one repeating every 20 ms. The intuition is that frequent tasks have tighter timing constraints, so they should preempt less frequent ones. RMS is a static priority algorithm — priorities are assigned once at design time and never change. Its key theoretical result is the schedulability bound: if total CPU utilization stays below approximately 69% (more precisely, n(21/n − 1) for n tasks), all deadlines are guaranteed to be met. This conservative bound means RMS sometimes rejects task sets that would actually work, but it never accepts one that will fail.

Earliest Deadline First (EDF) takes a dynamic approach. Instead of fixed priorities, the scheduler always picks the task whose deadline is nearest. If Task A's deadline is 8 ms away and Task B's is 3 ms away, B runs first regardless of their periods. EDF is optimal for single-processor systems — it can schedule any task set that is theoretically schedulable, up to 100% CPU utilization. The tradeoff is implementation complexity: the scheduler must continuously re-evaluate deadlines, and when the system is overloaded, EDF's behavior becomes unpredictable because many tasks miss deadlines simultaneously.

The choice between RMS and EDF reflects a classic engineering tradeoff. RMS is simpler to implement and analyze, making it preferred in safety-critical systems like avionics and medical devices where certification demands provable behavior. EDF extracts more useful work from the processor but is harder to reason about under overload. In practice, many real-time systems use RMS with utilization well below the bound, trading CPU efficiency for the certainty that no deadline will ever be missed.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Boolean Algebra → Boolean Type and Truth Values → Comparison Operators and Boolean Tests → Logical Operators and Boolean Algebra → Boolean Algebra and Fundamental Laws → Logic Gates Fundamentals → Implementing Boolean Functions with Gates → Karnaugh Map Simplification → Combinational Circuit Design → Flip-Flops and Latches → Binary Counters: Design and Analysis → Binary Arithmetic → Fixed-Point Number Representation → Two's Complement Representation → Overflow and Underflow Detection → Binary Adders: Half-Adders and Full-Adders → Full Adder and Carry Propagation → Carry Lookahead Adder Design → Half Adder Circuit Design → Multiplication Circuit Design → Sequential Circuit Design → Registers and Register Files → Instruction Set Architecture (ISA) → Kernel Architecture and OS Structure → System Calls and User/Kernel Mode → Processes and the Process Control Block → Process Creation: fork() and exec() → Process Termination and Resource Cleanup → Process States and State Transitions → Process Model Formalization → Context Switching and CPU Dispatch → CPU Scheduling Fundamentals → Round-Robin (RR) Scheduling → First-Come-First-Served (FCFS) Scheduling → Scheduling Fairness and Starvation Prevention → Thread Scheduling and Coordination → Real-Time Scheduling Algorithms

Longest path: 105 steps · 415 total prerequisite topics

Prerequisites (7)

Leads To (0)

No topics depend on this one yet.