time demand analysis. real time system schedulability of fixed-priority tasks we have identified...

17
Time Demand Analysis

Upload: denzel-turner

Post on 29-Mar-2015

243 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Time Demand Analysis. Real Time System Schedulability of Fixed-Priority Tasks We have identified several simple schedulability tests for fixed priority

Time Demand Analysis

Page 2: Time Demand Analysis. Real Time System Schedulability of Fixed-Priority Tasks We have identified several simple schedulability tests for fixed priority

Real Time System

Schedulability of Fixed-Priority Tasks

• We have identified several simple schedulability tests for fixed priority scheduling:– A system of n independent preemptable periodic tasks with Di = pi can be

feasibly scheduled on one processor using RM if and only if U ≤ n (21/n – 1)⋅– A system of simply periodic independent preemptable tasks with Di ≥ pi is

schedulable on one processor using the RM algorithm if and only if U ≤ 1

– [similar results for DM]

• But: there are algorithms and regions of operation where we don’t have a schedulability test and must resort to exhaustive simulation– Is there a more general schedulability test? Yes, but not as simple as those

we’ve seen so far…

Page 3: Time Demand Analysis. Real Time System Schedulability of Fixed-Priority Tasks We have identified several simple schedulability tests for fixed priority

Real Time System

Schedulability Test for Fixed-Priority Tasks

• Fixed priority algorithms are predictable and do not suffer from scheduling anomalies– The worst case execution time of the system occurs with the worst

case execution time of the jobs– Unlike dynamic priority algorithms, which can exhibit anomalous

behaviour• Use this as the basis for a general schedulability test:

1. Find the critical instant when the system is most loaded, and has its worst response time

2. Use time demand analysis to determine if the system is schedulable at that instant

3. Prove that, if a fixed-priority system is schedulable at the critical instant, it is always schedulable

Page 4: Time Demand Analysis. Real Time System Schedulability of Fixed-Priority Tasks We have identified several simple schedulability tests for fixed priority

Real Time System

1. Finding the Critical Instant

Page 5: Time Demand Analysis. Real Time System Schedulability of Fixed-Priority Tasks We have identified several simple schedulability tests for fixed priority

Finding the Critical Instant

Page 6: Time Demand Analysis. Real Time System Schedulability of Fixed-Priority Tasks We have identified several simple schedulability tests for fixed priority

Real Time System

Using the Critical Instant

• Having determined the critical instants, show that for each job Ji,c released at a critical instant, that job and all higher priority tasks complete executing before their relative deadlines

• If so, the entire system be schedulable…

• That is: don’t simulate the entire system, simply show that it has correct characteristics following a critical instant– This process is called time demand analysis

Page 7: Time Demand Analysis. Real Time System Schedulability of Fixed-Priority Tasks We have identified several simple schedulability tests for fixed priority

Real Time System

Time-Demand Analysis

Page 8: Time Demand Analysis. Real Time System Schedulability of Fixed-Priority Tasks We have identified several simple schedulability tests for fixed priority

Real Time System

Time Demand Analysis

Page 9: Time Demand Analysis. Real Time System Schedulability of Fixed-Priority Tasks We have identified several simple schedulability tests for fixed priority

Real Time System

Time Demand Analysis

Page 10: Time Demand Analysis. Real Time System Schedulability of Fixed-Priority Tasks We have identified several simple schedulability tests for fixed priority

Real-Time Systems

Time Demand Analysis…calculate

Example:

• Test if is satisfied for • Test if is satisfied for • Test if is satisfied for

)2,7(),2,5(),1,4( 321 TTT

1)( 11 Ctw

14

2)( 11

22

te

p

tCtw

1

1

0for ,)(i

kik

kii ptC

p

tCtw

Time-Demand Function

25

14

2)( 22

11

33

tte

p

te

p

tCtw

ttw )(1 41)4(4 1 wt

Ok!

ttw )(2 54)5(,43)4(4,5 22 wwt

Ok!

78)7(

,56)5(,45)4(4,5,7

3

33

w

wwt

Not satisfied!

ttw )(3

Page 11: Time Demand Analysis. Real Time System Schedulability of Fixed-Priority Tasks We have identified several simple schedulability tests for fixed priority

Real-Time Systems

Time Demand Analysis

1. For each , determine the time-demand function

according to

2. Check whether the inequality is satisfied for values of that are equal to

3. The time complexity of the time-demand analysis for each task is

1

1

)(i

kk

kii C

p

tCtw)(twi

ni ,,2,1

ttwi )(

t

kik ppjikpjt ,,2,1;,,2,1;

))(( 1ppnO n

Page 12: Time Demand Analysis. Real Time System Schedulability of Fixed-Priority Tasks We have identified several simple schedulability tests for fixed priority

Another example

Page 13: Time Demand Analysis. Real Time System Schedulability of Fixed-Priority Tasks We have identified several simple schedulability tests for fixed priority

Real-Time Systems

Another Example: Step 1

Page 14: Time Demand Analysis. Real Time System Schedulability of Fixed-Priority Tasks We have identified several simple schedulability tests for fixed priority

Real-Time Systems

Example: Step 2

Page 15: Time Demand Analysis. Real Time System Schedulability of Fixed-Priority Tasks We have identified several simple schedulability tests for fixed priority

Real-Time Systems

Example: Step 3

Page 16: Time Demand Analysis. Real Time System Schedulability of Fixed-Priority Tasks We have identified several simple schedulability tests for fixed priority

Real-Time Systems

Example: Step 4

Page 17: Time Demand Analysis. Real Time System Schedulability of Fixed-Priority Tasks We have identified several simple schedulability tests for fixed priority

Real Time System

Time demand Analysis: Summary