Real-Time Systems Design
embedded.seoultech.ac.kr
Seoul National Univ. of Science and Technology Dept. of Electrical and Information Engineering Prof. Choi, Byoung- Wook http:/ / embedded.seoultech.ac.kr @bwchoi2, bwchoi@seoultech.ac.kr
EVERY COMPUTER WILL BE EMBEDDED
Uniprocessor Scheduling
Week # 6 embedded.seoultech.ac.kr Every Computer will be Embedded Everywhere
Outline
• • Earliest Deadline First Scheduling Rate-Monotonic Scheduling
– Worst Arrival Phasings – Least Upper Scheduling Bound
•
Summary
3 / 23
Every Computer will be Embedded Everywhere
Dynamic job scheduling
• • Fixed job scheduling
– All jobs that have same tasks have the same fixed priority
Dynamic job scheduling
– Different jobs of the same task cab have different priority
τ1 τ2
4 / 23
Every Computer will be Embedded Everywhere
Earliest Deadline First (EDF) Scheduling
• • Can be used to schedule periodic tasks Uses dynamic priorities and preemptive scheduling
– Higher priority to task with earlier deadline
•
Example: 2- task set where each task is (C, T=D)
{ (2, 4), (3, 7)} 50%
τ1 τ2
43% • Utilization U of task set { ti} for i = 1, …, n:
C Ui = i Ti
5 / 23 i =1
U = ∑U i = ∑
n
Ci i =1 Ti
n
Every Computer will be Embedded Everywhere
EDF Schedulability Condition
Theorem: A task set is schedulable under EDF if and only if U ≤ 1. Proof:
t1
• •
t2
Assume that “ overflow” occurs at time t2. Let t1 be the latest time before t2 such that
– the processor is fully utilized in the interval [ t1 , t2] – only instances with deadlines before t2 executes in [ t1 , t2]
• •
If such a t1 cannot be found, then set t1 = 0. Let Cd be the computational demand in [ t1 , t2] n t 2 − t1 t 2 − t1 Cd = ∑ * ci = (t 2 − t1 )U * ci ≤ ∑ Ti Ti ri ≥ t1 , d1 ≤t 2 i =1
•
But an overflow implies that Cd > ( t2