1 Allocation/Scheduling Problem Statement
1 Allocation/Scheduling Problem Statement
1
Release time of a task time when all data
needed to begin execution of the task is available.
2
for task Ti , relative deadline= di and release
time =t; then Tabs,i = t + di .
3
Define schedule as functional mapping S: set of
processors X time −− > set of tasks.
4
preemptive schedule tasks may be interrupted
by others.
5
preemptive schedule is flexible, critical tasks meet
deadlines by interrupting less critical ones.
6
2 Notations of RM and EDF algorithms
Pi is period of Ti .
Di is absolute deadline of Ti .
ri is release time of Ti .
7
3 Assumptionsof RM and EDF algorithms
8
4 More assumptions for RM algorithm
9
5 Example: Consider three periodic tasks
10
6 Schedulability test
sort all tasks in the task set and for highest pri-
ority task T1, we require e1 < P1.
11
All these invokations of T1 must complete along
with the invokation of T2 within the specified time
t.
12
Similarly, t > ⌈(t/P 1)⌉ ∗ e1 + ⌈(t/P2)⌉ ∗ e2 + e3
for some t as multiple of P1 and/or P2 and t < P3.
13
Wi(t) is total amount of work carried by T1 , T2, .., Ti
initiated in the interval [0, t].
14
RM scheduling conditions are:
15
Consider 4 tasks with execution times and peri-
ods as follows: (20,100);(30,150);(80,210);(100,400).
16
For first task, check if e1 < 100; which is true.
or 3*e1+2*e2+2*e3+e4¡300 or 4*e1+3*e2+2*e3+e4¡400
17
7 Incorporation of sporadic tasks
18
Total utilization = U out of which processor uti-
lization allotted to sporadic tasks is Us .
19
processor utilization U = Σ(ei/Pi) for n tasks.
20
start end task scheduled instance
0 2 T1 1
2 5 T2 1
5 7 T1 2
7 10 T2 2
10 12 T1 3
12 14
14 15 T2 3
15 17 T1 4
17 19 T2 3
19 20
21
For two tasks,r
it can be shown that (e1/P 1) +
(e2/P 2) < 2( (2) − 1) is the condition for RM
schedulability.
22
Case 1: Processor is not executing T1 at time P2.
23
Case 2: Processor executing T1 at time P2
24
From the two cases, we find that the full utiliza-
tion occurs with minimum value that U can have;
occurs when
25
It can be shown that to increase utilization, ei =
Pi+1 − Pi.
For full utilization, en = 2P1 − Pn is required,
Pn < 2P1
26
8 RM is optimal static priority algorithm
27
Finding out all such Ti and Tj and exchanging in
similar manner, arrive at SRM -like priority assign-
ment.
28
9 EDF is optimal for uniprocessors
29
Now we define:
30
Case 1: Processor is continuously busy over [T1, T2]
in case of EDF schedule.
31
Case 2: Processor is idle over some part of (T1, T2 )
due to EDF schedule.
32