Professional Documents
Culture Documents
Ejercicio Modelo 1 PDF
Ejercicio Modelo 1 PDF
1
Periodic Tasks
Carnegie Mellon University
Software Engineering Institute
2 msec
Deadline 6 msec
20 msec after arrival
150 msec
τ2 40 msec
τ3
10 msec 2 msec
100 msec
Desired response
20 msec average
Ci
Task’s CPU utilization: U i = -----
Ti
• Ci = compute time (execution time) for task τi
• Ti = period of task τi
IP:
0 10 20 30
VIP:
0 25
4
Periodic Tasks
Carnegie Mellon University
Software Engineering Institute
Schedulability: UB Test
Utilization bound(UB) test: a set of n independent
periodic tasks scheduled by the rate monotonic
algorithm will always meet its deadlines, for all task
phasings, if
C1 Cn
------ + ... + ------- ≤ U(n) = n ( 2 1 / n – 1 )
T Tn
1
C T U
Task τ1: 20 100 0.200
Task τ2: 40 150 0.267
Task τ3: 100 350 0.286
6
Periodic Tasks
Carnegie Mellon University
Software Engineering Institute
τ1
τ2
τ3
Scheduling Points
7
Periodic Tasks
Carnegie Mellon University
Software Engineering Institute
10
Periodic Tasks
Carnegie Mellon University
Software Engineering Institute
Schedulability: RT Test
Theorem: for a set of independent, periodic tasks, if
each task meets its first deadline, with worst-case task
phasing, the deadline will always be met.
Response time (RT) test: let an = response time of task i.
an may be computed by the following iterative formula:
i–1 a i
a n + 1 = C i + ∑ -----n- C j where a 0 = ∑ C j
j = 1 Tj j=1
11
Periodic Tasks
Carnegie Mellon University
Software Engineering Institute
12
Periodic Tasks
Carnegie Mellon University
Software Engineering Institute
13
Periodic Tasks
Carnegie Mellon University
Software Engineering Institute
a1 2
= C 3 + ∑ ------ C j = 100 + 260
--------- ( 40 ) + 260 ( 40 ) = 30
---------
j = 1 Tj 100 150
a2 2
= C 3 + ∑ ------ C j = 100 + 300 300
--------- ( 40 ) + --------- ( 40 ) = 30
j = 1 Tj 100 150
a 3 = a 2 = 300 Done!
14
Periodic Tasks
Carnegie Mellon University
Software Engineering Institute
τ1
τ2
τ3
15
Periodic Tasks
Carnegie Mellon University
Software Engineering Institute
Task τ2: C = 2 T = 6 2 2
Task τ3: C = 2 T = 10 3 3
a) Apply UB test
b) Draw timeline
c) Apply RT Test
16
Periodic Tasks
Carnegie Mellon University
Software Engineering Institute
Exercise: Worksheet
0 5 10 15 20
Task_____
0 5 10 15 20
Task_____
0 5 10 15 20
Task_____
17
Periodic Tasks
Carnegie Mellon University
Software Engineering Institute
Summary
UB test is simple but conservative.
RT test is more exact but also more complicated.
To this point, UB and RT tests share the same
limitations:
• all tasks run on a single processor
• all tasks are periodic and noninteracting
• deadlines are always at the end of the period
• there are no interrupts
• rate monotonic priorities are assigned
• there is zero context switch overhead
• tasks do not suspend themselves
19
Periodic Tasks