chapter 3: real-time scheduling and schedulability analysis albert m. k. cheng
TRANSCRIPT
Chapter 3: Real-Time Scheduling and Schedulability Analysis
Albert M. K. Cheng
Real-Time Scheduling Schedulers: compile-time, run-time Systems: uniprocessor, multiprocessor Characterization of a task:
c computation time (WCET)
s start (release or ready) time
d deadline (relative to start time)
p period or minimum separation
Optimal Scheduler One which may fail to meet the deadline of
task only if no other scheduler can Examples include uniprocessor earliest-
deadline-first (EDF) and least-laxity-first (LLF) schedulers for independent tasks with no synchronization constraints and no resource requirements
EDF vs FIFO (non-real-time scheduler)Example: task s d c
1 0 5 3
2 0 12 4
3 0 10 4
ready queue: head 2, 3, 1 tail
FIFO schedule: 2, 3, 1 (task 1 misses deadline)
EDF schedule: 1, 3, 2 (all tasks meet deadlines)
Rate-Monotonic (RM) Scheduler:Basic Assumptions Compile-time/static Preemptive tasks No precedence constraints Negligible context-switching time Periodic tasks
Schedulability Test for RM Liu and Layland’s sufficient condition:
Utilization U = sum c_I / p_I
Number of tasks n
A task set is schedulable if
U <= n(2^(1/n) – 1)
Necessary and sufficient condition requires
checking inequalities or plot of W vs t
Sporadic Tasks Can be modeled by periodic tasks with
periods equal to the minimum separation Deferred server (DS) is less wasteful Tasks with critical sections (non-
preemptive) must be handled differently
Scheduling Tasks with Constraints Deterministic Rendezvous Model: tasks
with rendezvous (as in Ada) Kernelized Monitor Model: tasks with
critical sections Dataflow Model: tasks with precedence
and data flow constraints
Multiprocessor Scheduling Scheduling game board representation:
shows a tasks’ statuses dynamically Non-optimality of uniprocessor-optimal
schedulers Need to consider special cases to improve
scheduling efficiency Need to avoid conflict-free task sets