





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An exercise on deriving the utilization bound for rate monotonic scheduling in real-time systems. It includes the calculation of the maximum value of a product for a schedulable system and the comparison of the results with the liu and layland bound and the hyperbolic bound. The document also introduces the concept of deadline monotonic scheduling and its schedulability condition.
Typology: Study notes
1 / 9
This page cannot be seen from the preview
Don't miss anything!






Exercise:
Know Your Worst Case Scenario
i
i
i
C 1
P 1
P 2
Task 1
Task 2
1 1
2 1 2 P P
P C P
= −
−
= 1 + − 1 1
2
1
2
2
1 P
P
P
P
P
C U
−
−
= 1 + − 1
1
2
1
2
1
2
1
2
2
1
P
P
P
P
P
P
P
P
P
P U
1 1
(^2) =
⇒ P
P
= − 1
2 1
1 12 P
P P
P C P
= − 1
2 2 1 1 P
P C P C
C 1
P 1
P 2
Task 1
Task 2
1 1
2 1 2 P P
P C P
= −
−
= 1 + − 1 1
2
1
2
2
1 P
P
P
P
P
C U
−
−
= 1 + − 1
1
2
1
2
1
2
1
2
2
1
P
P
P
P
P
P
P
P
P
P U
1 1
(^2) =
⇒ P
P
= − 1
2 1
1 12 P
P P
P CP
P (^1) C 1
P 2
Task 1
Task 2
C 2
C 1
P 1
P 2
Task 1
Task 2
1 1
2 1 2 P P
P C P
= −
−
= 1 + − 1 1
2
1
2
2
1 P
P
P
P
P
C U
−
−
= 1 + − 1 1
2
1
2
1
2
1
2
2
1
P
P
P
P
P
P
P
P
P
P U
1 1
(^2) =
⇒ P
P
= − 1
2 1
2 (^1 1) P
P P
C PP
C 1
P 1
P 2
Task 1
Task 2
C 2
2 1 1
1 2 1
P P C
C C P
− =
( ) ∏
i i
2
1
2
2 2
2
2 2
1
2
1
1 1
1
1 1
2 1 1 1 2
1 2 1
Critically
Schedulable
∏ (^ +)=
i i
2
1
2
2 2
2
2 2
1
2
1
1 1
1
1 1
2 1 1 1 2
1 2 1
Critically
Schedulable
∏ (^ +)=
i i
2
1
2
2 2
2
2 2
1
2
1
1 1
1
1 1
2 1 1 1 2
1 2 1
Critically
Schedulable
∏ (^ +)=
i i
2
1
2
2 2
2
2 2
1
2
1
1 1
1
1 1
2 1 1 1 2
1 2 1
Critically
Schedulable
∏ (^ +)= =
−
i n n
n i
n n
n n
n
n n
i
i
i
i i
i
i i
n n
i i i
1
2 1
3
1
2
1
1
1
1
Critically
Schedulable
∏ (^ +)= =
−
i n n
n i
n n
n n
n
n n
i
i
i
i i
i
i i
n n
i i i
1
2 1
3
1
2
1
1
1
1
Critically
Schedulable
∏ (^ +)= =
−
i n n
n i
n n
n n
n
n n
i
i
i
i i
i
i i
n n
i i i
1
2 1
3
1
2
1
1
1
1
Critically
Schedulable
Periodic Task Scheduling
Rate Monotonic EDF
Bound Optimality Bound Optimality
Hyperbolic Bound
Periodic Task Scheduling
Rate Monotonic EDF
Bound Optimality Bound Optimality
Hyperbolic Bound
With
Period=Deadline
Periodic Task Scheduling
Rate Monotonic EDF
With
Deadline < Period
Deadline
Pi
Di
i
i
i
i
Pi
Di
i
i
i
i
i
n
i
i
1 /
Pi
Di
i
i
i
n
i
i
1 /
Pi
Di
Pi
Di
Pj Cj
Pi
Di
Pj Cj
j j
i
Pj Cj
j j
i
i j
j j
i
Pi
Di
Pj Cj
j j
i
i j
j j
i
My exec. time
Worst case interference,
From higher priority tasks (^) I ,
My deadline
Pi
Di
Pj Cj
j j
i
i j
j j
i
My exec. time
Worst case interference,
From higher priority tasks (^) I ,
My deadline
Pi
Di
Pj Cj
Pi
Di
Ri Consider a system of two tasks:
Task 1: P 1 =1.7, D 1 =0.5, C 1 =0.
Task 2: P 2 =8, D 2 =3.2, C 2 =
3
3
3
5 1
7
5
5
5
2
( 2 ) ( 2 ) 2
1 1
( 1 ) ( 2 ) 2
2
( 1 ) ( 1 ) 2
1 1
( 0 ) ( 1 ) 2
2
( 0 ) ( 0 ) 2
1
( 0 )
= + =
=
^ =
= + =
=
^ =
= + =
= =
R I C
C P
R I
R I C
C P
R I
R I C
I C
i i
j j
i
j
= (^) ∑
Pj Cj
Pi
Di
Ri Consider a system of two tasks:
Task 1: P 1 =1.7, D 1 =0.5, C 1 =0.
Task 2: P 2 =8, D 2 =3.2, C 2 =
3
3
3
5 1
7
5
5
5
2
( 2 ) ( 2 ) 2
1 1
( 1 ) ( 2 ) 2
2
( 1 ) ( 1 ) 2
1 1
( 0 ) ( 1 ) 2
2
( 0 ) ( 0 ) 2
1
( 0 )
= + =
=
^ =
= + =
=
^ =
= + =
= =
R I C
C P
R I
R I C
C P
R I
R I C
I C
i i
j j
i
j
= (^) ∑
3 < 3.2 Ok!
Pj Cj
Pi
Di
Ri
Dj
Pj Cj
Pi
Di D j C L P
i
n
i i
i ≤
∑ = 1
L
The Processor Demand
Schedulability Test for EDF
Pj Cj
Pi
Di D j C L P
i
n
i (^) i
i (^) ≤
∑ = 1
L
The Processor Demand
Schedulability Test for EDF
Observation 1: Check only within a hyper-period (schedule repeats itself)
Pj Cj
Pi
Di D j C L P
i
n
i (^) i
i (^) ≤
∑ = 1
L
The Processor Demand
Schedulability Test for EDF
Observation 1: Check only within a hyper-period (schedule
repeats itself)
Pj Cj
Pi
Di D j C L P
i
n
i i
i ≤
∑ = 1
L
Least common multiple of
all task periods
The Processor Demand
Schedulability Test for EDF
Observation 1: Check only within a hyper-period (schedule
repeats itself afterwards)
Observation 2: Check only on absolute deadlines
Pj Cj
Pi
Di D j C L P
i
n
i i
i ≤
∑ = 1
L
The Processor Demand
Schedulability Test for EDF
Observation 1: Check only within a hyper-period (schedule repeats itself afterwards)
Observation 2: Check only on absolute deadlines
Observation 3: If U < 1, Demand is trivially satisfied after some point, L*
i
n
i i
i ≤
∑ = 1
Time
Demand
Demand=time
L
=?
The Processor Demand
Schedulability Test for EDF
i
n
i (^) i
i ≤
∑ = 1
Time
Demand
Demand=time
L
=?
∑ ∑ ∑ = = =
n
i
i i i
n
i
n
i
i i
i i i i
i
i
i
i
i
C tU P D U P
t D P C P
t D
t D
t D
1 1 1
The Processor Demand
Schedulability Test for EDF
Time
Demand
Demand=time
∑ ∑ ∑ = = =
n
i
i i i
n
i
n
i
i i
i i i i
i
i
i
i
i
C tU P D U P
t D P C P
t D
t D
t D
1 1 1
i
n
i (^) i
i ≤
∑ = 1
The Processor Demand
Schedulability Test for EDF
Time
Demand
Demand=time
∑ ∑ ∑ = = =
n
i
i i i
n
i
n
i
i i
i i i i
i
i
i
i
i
C tU P D U P
t D P C P
t D
t D
t D
1 1 1
U
P DU
LU P DU L L
n
i
n i i i
i
i i i −
−
∑
∑
=
= 1
( )
( ) ,
1
i
n
i (^) i
i ≤
∑ = 1