You are on page 1of 11

Utilization based schedulability tests

pros:
usually involves a simple computational test mathematically rigorous Seminal paper

cons:
not always conclusive
sufficient but not necessary

only valid if the workload model and the underlying assumptions of the test are consistent
can lead to false confidence

11/6/2012

Dr Alain Beaulieu

Alternatives
When utilization based tests are inconclusive, we can always construct a timing graph of the system
construct graph over the interval [0, max {pi}] if all tasks meet their deadlines within their first period, the system is schedulable assumes that all tasks are in phase the problem with this approach is that it will be impractical for most large systems and is not easily automated
As experienced in the first homework

alternative: time-demand analysis

11/6/2012

Dr Alain Beaulieu

Revisiting Critical Instants


Recall that a critical instant is defined as the instant in time that a job is released such that it has the maximum response time of all jobs in the task
think of it as the worst possible time (busiest) to release on the processor

Theorem: in a fixed priority system (where every job in


the critical instant for Ti occurs when it releases at the same time as a job in each higher priority task

a task completes before another job in the same task releases),

11/6/2012

Dr Alain Beaulieu

Critical Instants
Example 1:
T= { (3,1), (5, 1), (10, 2) }
T1 T2 T3
0 2

1
1 1

1
1 1
4 6

1
1 1
8 10 12

The critical instant for tasks T2 and T3 is 0


In fact for in phase tasks, a critical instant always exists at t = 0
11/6/2012

Dr Alain Beaulieu

Critical Instants
Example 2:
T= { (1,3,1,3), (5, 1), (10, 2) }
T1 T2 T3
0 2

1
1 1

1
1 1
4 6

1
1 1
8 10 12

The critical instant for tasks T2 and T3 is 10

11/6/2012

Dr Alain Beaulieu

Understanding Response Time


T = { (100, 20), (150, 30), (250, 60) }

w3 = e3 + w3/p1 e1 + w3/p2 e2
= 60 + 2(20) + 1(30) {by viewing the graph} = 130
T1 T2 T3
0
11/6/2012

w3 = 130

100
Dr Alain Beaulieu

200

Solving the Response Time Equation


Essentially, form a recursive relationship with equation (5) and solve iteratively: win+1 = ei + win / pj ej (6)
jhp(i)

where initial (seed) value wi0 = ei

The algorithm then becomes:


solve for successive values of win+1 if win+1 = win , then solution found -> wi = win if win+1 > Di , then task i cannot meet its deadline

11/6/2012

Dr Alain Beaulieu

Exercise
Draw the schedule for the system below
(go out far enough in time to include as a minimum the completion of the first job in each periodic task and all aperiodic jobs)

Determine the response time of A1 Determine the worst case response time of all periodic tasks Is the system schedulable? T={ (5, 1.5), (7, 2) } TDS = ( 4, 1) , A = {(0.5, 2.5), (2.5, 0.25)}
11/6/2012

Dr Alain Beaulieu

Exercise Solution
draw the schedule for the system below
Tasks

T={ (5, 1.5), (7, 2) } TDS = ( 4, 1) , A = {(0.5, 2.5), (2.5, 0.25)}


A1

TDS

A1

A1

A 2

T1

T2

11/6/2012

Dr Alain Beaulieu

Exercise Solution
determine the response time of A1
wA1 = 8.5 - 0.5 = 8 wA2 = 8.75 - 2.5 = 6.25

determine the worst case response time of all periodic tasks


w11 w12 = e1 + es + (w10-es) / ps es where w10 = 1.5 = 1.5 + 1 + (1.5 -1) / 4 (1) = 3.5 = 2.5 + (3.5 -1) / 4 (1) = 3.5 (worst-case)

therefore w1 = 3.5 D1
11/6/2012

Dr Alain Beaulieu

Exercise Solution
determine the worst case response time of all periodic tasks (continued)
w21 w22 w23 = e2 + es + (w20-es) / ps es + (w20) / p1 e1 = 2 + 1 + (2 -1) / 4 (1) + 2 / 5 (1.5) = 5.5 = 3 + (5.5 -1) / 4 (1) + 5.5 / 5 (1.5) = 8 = 3 + (8 -1) / 4 (1) + 8/ 5 (1.5) =8 (worst-case) w20 = 2

is the system schedulable?


No since all tasks do not meet their deadlines under worst-case conditions, we can not guarantee the system schedulable

therefore w2 = 8 > D2

11/6/2012

Dr Alain Beaulieu

You might also like