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 ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersIntroduction to ExponentsOrder of OperationsInteger Order of OperationsVariable ExpressionsThe Distributive PropertyVariables and Expressions ReviewIntroduction to PolynomialsAdding and Subtracting PolynomialsMultiplying PolynomialsFactorialPermutationsCombinationsCounting Principles: Addition and Multiplication RulesIntroduction to Graph TheoryPropositional Logic FoundationsLogical EquivalencesBoolean AlgebraBoolean Type and Truth ValuesComparison Operators and Boolean TestsLogical Operators and Boolean AlgebraBoolean Algebra and Fundamental LawsLogic Gates FundamentalsImplementing Boolean Functions with GatesKarnaugh Map SimplificationCombinational Circuit DesignFlip-Flops and LatchesBinary Counters: Design and AnalysisBinary ArithmeticFixed-Point Number RepresentationTwo's Complement RepresentationOverflow and Underflow DetectionBinary Adders: Half-Adders and Full-AddersFull Adder and Carry PropagationCarry Lookahead Adder DesignHalf Adder Circuit DesignMultiplication Circuit DesignSequential Circuit DesignRegisters and Register FilesInstruction Set Architecture (ISA)Kernel Architecture and OS StructureSystem Calls and User/Kernel ModeProcesses and the Process Control BlockProcess Creation: fork() and exec()Process Termination and Resource CleanupProcess States and State TransitionsProcess Model FormalizationContext Switching and CPU DispatchCPU Scheduling FundamentalsRound-Robin (RR) SchedulingFirst-Come-First-Served (FCFS) SchedulingScheduling Fairness and Starvation PreventionThread Scheduling and CoordinationReal-Time Scheduling Algorithms

Longest path: 105 steps · 415 total prerequisite topics

Prerequisites (7)

Leads To (0)

No topics depend on this one yet.