2015-04-08

advertisement
TECHNISCHE UNIVERSITEIT DELFT
Faculteit Elektrotechniek, Wiskunde en Informatica
IN4343 – Real Time Systems
April 8th 2015, from 09:00 to 12:00
Koen Langendoen
Question:
1
2
3
4
5
6
Total
Points:
5
10
30
15
20
10
90
Score:
• This is a closed book exam
• You may use a simple calculator only (i.e. graphical calculators are not permitted)
• Write your answers with a black or blue pen, not with a pencil
• Always justify your answers, unless stated otherwise
• The exam covers the following material:
(a) chapters 1-6, 8-9 of the book “Hard Real-Time Computing Systems (3rd ed)” by G. Buttazzo
(b) the paper “The Worst-Case Execution-Time Problem” by Wilhelm et al. (except Section 6)
(c) the paper “Transforming Execution-Time Boundable Code into Temporally Predictable
Code” by P. Puschner
(d) the paper “Best-case response times and jitter analysis of real-time tasks” by R.J. Bril,
E.F.M. Steffens, and W.F.J. Verhaegh
Cheat Sheet
IN4343 Real-Time Systems
Liu and Layland (LL) bound
Hyperbolic (HB) bound
RM
= n(21/n − 1)
Ulub
n
Y
(Ui + 1) ≤ 2
i=1
Response Time Analysis
WRi = Ci +
BRi = Ci +
i−1 X
WRi + AJk
k=1
i−1 X
k=1
w+ = max(w, 0)
dX
i ≤t2
Ci
g(t1 , t2 ) =
Processor Demand
Tk
Ck
+
BRi − AJk
−1
Ck
Tk
g(0, L) =
ri ≥t1
schedulability
∀L ∈ D,
n X
L + Ti − Di
Ti
i=1
Ci
g(0, L) ≤ L
D = {dk |dk ≤ min(H, max(Dmax , L∗ ))}
H = lcm(T1 , . . . , Tn )
n
X
(Ti − Di )Ui
L∗ =
Polling Server
schedulability
i=1
1−U
RM +P S
= Us + n
Ulub
n
Y
(Ui + 1) ≤
i=1
response time
Deferrable Server
schedulability
"
2
Us + 1
2
Us + 1
1/n
−1
#
Ra = Ca + ∆a + Fa (Ts − Cs )
ra
Ca
∆a =
Ts − ra
Fa =
−1
Ts
Cs
"
#
1/n
Us + 2
RM +DS
= Us + n
Ulub
−1
2Us + 1
n
Y
Us + 2
(Ui + 1) ≤
2Us + 1
i=1
response time
NP scheduling
level-i busy period
Ra = Ca + ∆a − C0 + Fa (Ts − Cs )
C0 = min(Cs (ra ), ∆a )
ra
Ts − ra
∆a =
Ts
i X
Li
Li = Bi +
Ch
Th
Fa =
h=1
Bi = max{Cj }
j>i
response time
sik = Bi + (k − 1)Ci +
i−1 X
sik
h=1
Th
Ca − C0
−1
Cs
l m
Ni = LTii
+ 1 Ch
Rik = (sik + Ci ) − (k − 1)Ti
Ri = max {Rik }
k∈[1,Ni ]
Elastic Model
utilization
∀i
Ui = Ui0 − (U0 −
Ud ) EESi
where ES =
n
X
i=1
Ei
Question 1
[5 points]
Determining the worst case execution time of a task lies at the heart of real-time systems.
(a) 2 points Provide two reasons explaining the variability observed in practice when measuring
the execution time of a task.
(b) 3 points Succinctly explain the concept of static timing analysis and hint at how the abovementioned variability is handled.
Question 2
[10 points]
EDF is known to be optimal for aperiodic task scheduling. The proof by (Dertouzos:1974) starts
from an arbitrary feasible schedule σ, which is then transformed through a sequence of steps into
the corresponding EDF schedule.
(a) 2 points The schedule σ is scanned until a time slot tA is found in which a task JA is
scheduled while there exists another task JB having the earliest deadline of all runnable tasks,
but that is scheduled later at time tB . Draw a time line visualizing this situation.
(b) 2 points Tasks JA and JB are then swapped. Draw the time line after the transformation.
(c) 6 points Argue why the transformation step preserves feasibility.
Question 3
[30 points]
Given the following preemptable periodic tasks scheduled based on the Rate Monotonic Algorithm:
τ1
τ2
τ3
τ4
Ci
2
2
3
3
Ti
5
6
18
35
(a) 10 points Demonstrate that this task set is feasible and report the maximum lateness.
(b) 8 points Derive the best case response times of the tasks.
(c) 4 points When computing the best case response time we must account for the interference
from
tasks
with higher priority. However, we lcannot
l
m
m simply round up as for the worst-case
WRi
BRi
( Tk ), but must count one occurrence less ( Tk − 1). Explain why this is the case.
(d) 8 points Explain what the effects are on the worst and best case response times when task
τ2 receives an activation jitter of 1.
Question 4
[15 points]
Given the following preemptable periodic tasks running under the EDF algorithm:
τ1
τ2
τ3
Ci
2
3
3
Di
4
6
8
Ti
6
8
13
(a) 2 points What method can be used to determine the feasibility of the above task set if the
deadlines would be equal to the periods?
(b) 4 points With the given deadlines, one has to resort to the processor demand criterion. Until
what time should the criterion be checked?
(c) 9 points Is the task set feasible under EDF?
Question 5
[20 points]
When mixing periodic and aperiodic tasks one can make use of slack stealing to schedule the
aperiodic tasks. Consider the following periodic tasks and aperiodic jobs:
τ1
τ2
Ci
1
2
Ti
4
5
J1
J2
ai
2
8
Ci
3
2
(a) 4 points Slack stealing is quite advanced. Comment on its pros and cons when compared to
a simple polling server.
(b) 8 points Report the response times of the two aperiodic jobs when an RM scheduler is
deployed.
(c) 8 points Report the response times of the two aperiodic jobs when an EDF scheduler is
deployed.
Question 6
Despite careful considerations systems may become overloaded due to overruns.
(a) 4 points Describe the two types of overruns.
(b) 6 points Describe how robust EDF functions.
[10 points]
Download