lecture05e
lecture05e
Scheduling of Periodic
Tasks – Part 1
Slides from
Dr Colin Perkins
Real-Time and Embedded Systems
University of Glasgow
1
Lecture Outline
• Assumptions
• Fixed-priority algorithms
– Rate monotonic
– Deadline monotonic
• Dynamic-priority algorithms
– Earliest deadline first
– Least slack time
• Relative merits of fixed- and dynamic-priority scheduling
• Schedulable utilization and proof of schedulability
• Jobs in a task may be assigned the same priority (task level fixed-
priority) or different priorities (task level dynamic-priority)
• The priority of each job is usually fixed (job level fixed-priority);
but some systems can vary the priority of a job after it has started
(job level dynamic-priority)
– Job level dynamic-priority usually very inefficient
0 4 8 12 16 20
Priority-driven Scheduling of Periodic Tasks – Part 1 7
Deadline Monotonic Scheduling
• The deadline monotonic algorithm assigns task priority according
to relative deadlines – the shorter the relative deadline, the higher
the priority
• When relative deadline of every task matches its period, then rate
monotonic and deadline monotonic give identical results
• When the relative deadlines are arbitrary:
– Deadline monotonic can sometimes produce a feasible schedule in cases
where rate monotonic cannot
– But, rate monotonic always fails when deadline monotonic fails
0 1 2 3 4 5 6 7 8 9 10
LST J1,1 J2,1 J1,2 J2,1 J1,3 J2,2 J1,4 J2,2 J1,5 J2,2
EDF J1,1 J2,1 J1,2 J2,1 J1,3 J2,2 J1,4 J2,2 J1,5 J2,2
RM J1,1 J2,1 J1,2 J2,1 J1,3 J2,1 J2,2 J1,4 J2,2 J1,5 J2,2
0 2 4 6 8 10
• Notes:
– Result is independent of ϕi
– Result can also be shown to apply to strict LST
0 1 2 3 4 5 6 7
0.6 n
2 4 6 8 10 12 14 16 18
Di = pi