ppt

Improved Conditions for Bounded
Tardiness under EPDF Fair
Multiprocessor Scheduling
UmaMaheswari Devi and Jim Anderson
University of North Carolina at Chapel Hill
Outline
•
•
•
•
Introduction & Motivation
Overview of Pfair scheduling
Contributions
Summary
WPDRTS ‘04
2
Context
• Scheduling under Earliest-Pseudo-DeadlineFirst
• EPDF is non-optimal
Why EPDF when there exist optimal
Pfair scheduling algorithms?
WPDRTS ‘04
3
Pfair Scheduling
• Quantum-length subtasks are schedulable
entities.
• Subtasks prioritized by their deadlines.
• Resolving priority ties carefully is crucial for
optimality.
• Optimal algorithms use non-trivial tiebreaking rules.
WPDRTS ‘04
4
Why EPDF?
• Tie-breakers unnecessary or unacceptable for soft
and dynamic real-time applications.
• Soft real-time systems
– May miss deadlines occasionally.
– tardiness(Ji) = max(0, (t-d(Ji))
• Dynamic systems
– Tasks leave and join
– Spare capacity reallocated by changing task parameters
(by “reweighting”).
• Don’t use tie-breaking rules for such systems.
– Just use EPDF
WPDRTS ‘04
5
Prior EPDF-based Results
(Srinivasan and Anderson)
• Optimal on up to 2 processors.
• Optimal on M>2 processors if
– The weight of each task at most 1/(M-1).
• Ensures a tardiness of at most q quanta if
– The weight of each task is at most q/(q+1).
• Weight  ½  tardiness  1
WPDRTS ‘04
6
Open Issues
• Can tardiness under EPDF exceed one
quantum?
• If yes, can the weight restrictions be
improved?
WPDRTS ‘04
7
Outline
•
•
•
•
Introduction & Motivation
Overview of Pfair scheduling
Contributions
Summary
WPDRTS ‘04
8
Pfair Scheduling
• Introduced by Baruah et al. (’93)
• Proportionate progress (uniform rate of
execution)
– Means for optimally scheduling recurrent real-time
tasks on multiprocessors in polynomial time.
• Proportionate progress with respect to:
– Task weight — wt(T)
• wt(T) = T.e/T.p  1
– Ideal fluid scheduler
• Allocation to T in [t1,t2) = wt(T)(t2t1)
WPDRTS ‘04
9
Lag
• Allocation error with respect to the ideal
system
– lag(T, t, S) = ideal(T, t) – actual(T, t, S)
allocation error
for task T at
time t
total allocation
to T in the ideal
schedule over [0,t)
total allocation to T in the
schedule under
consideration over [0,t)
• Positive  behind, negative  ahead, zero 
punctual
WPDRTS ‘04
10
Pfairness
Example: Task T with wt(T) = 3/8
Ideal
Allocation
1
3/8
Possible
allocations
to a periodic
task
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
Lag
1
0
-1
-2
WPDRTS ‘04
11
Pfairness
Example: Task T with wt(T) = 3/8
Ideal
Allocation
1
3/8
Possible
allocations
to a periodic
task
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
Lag
1
0
-1
A schedule is Pfair iff
(T, t :: 1 < lag(T, t) < 1)
-2
WPDRTS ‘04
12
Subtasks
• Pfairness ensured by
– Scheduling subtasks
• Each task is broken into a sequence of quantum-length
subtasks.
– Time-driven, quantum-based scheduling
• Scheduling decisions at quantum boundaries.
• Time is integral, measured in units of quanta.
• Interval [i, i+1) – is ith quantum or time slot.
• Schedules at most M subtasks (M – no. of processors).
• Task migrations are allowed.
WPDRTS ‘04
13
Task Models
Example: Task T with wt(T) = 3/8
1
3/8
Total
0
Ideal
Allocation
6/8
12/8
18/8
30/8
36/8
42/8
Periodic
2
8
T3
1
8
T2
T1
3
3
8
3
8
3
8
3
8
3
8
2
8
r(T1)
2
8
T6
1
8
T5
3
8
T4
3
8
54/8
f(T6,13)
3
8
1
8
6
3
8
3
8
3
8
3
8
1
8
2
8
d(T1)
0
1
WPDRTS ‘04
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
14
Task Models
Example: Task T with wt(T) = 3/8
1
3/8
Total
0
Ideal
Allocation
6/8
12/8
18/8
1
8
T2
0
3
30/8
36/8
42/8
6
Sporadic
2
8
T3
T1
3
3
8
3
8
1
WPDRTS ‘04
3
8
3
8
3
8
3
8
T6
1
8
T5
2
8
2
T4
3
4
5
6
7
2
8
8
9
3
8
3
8
10
1
8
3
8
3
8
3
8
3
8
1
8
2
8
11
12
13
14
15
16
17
18
15
Task Models
Example: Task T with wt(T) = 3/8
1
3/8
Total
0
Ideal
Allocation
6/8
12/8
18/8
1
8
T2
0
30/8
36/8
42/8
6
Intra-sporadic
T3
T1
3
3
8
3
8
1
WPDRTS ‘04
3
8
3
8
2
8
3
8
3
8
2
T6
1
8
T5
2
8
T4
3
4
5
6
7
8
2
8
9
3
8
3
8
10
1
8
3
8
3
8
3
8
3
8
1
8
2
8
11
12
13
14
15
16
17
18
16
Task Models
Example: Task T with wt(T) = 3/8
1
3/8
Total
0
Ideal
Allocation
6/8
12/8
18/8
3
30/8
36/8
Generalized Intra-sporadic
2
8
3
8
2
8
3
8
T6
3
Theorem (Baruah etTal.,
Anderson & Srinivasan):
1
3
3
1
T5 8  8on 8M 8
A Pfair schedule exists for a GIS system
3
3
2
3
3
2
Processors
iff
.
.
wt
(
T
)

M

T 8 8 8
T 8 8 8….
1
0
42/8
WPDRTS ‘04
2
3
4
5
3
8
4
T 
1
3
8
6
7
8
9
10
11
12
13
14
15
16
17
18
17
Pfair-based Scheduling Algorithms
• PF (Baruah et al.), PD (Baruah et al.), PD2(Anderson
and Srinivasan)
– Prioritize subtasks on an earliest-pseudo-deadline-first
basis.
– Ties among subtasks cannot be resolved arbitrarily.
– Differ in tie-breaking rules.
• BF (Zhu et al.)
– For reduced context switches.
• PDQ (QRFair) (Anderson et al.)
– For efficient and nearly fair reallocation of spare capacity.
WPDRTS ‘04
18
Outline
•
•
•
•
Introduction & Motivation
Background on Pfair scheduling
Contributions
Summary
WPDRTS ‘04
19
Results of This Paper
• Tardiness under EPDF may exceed three quanta.
• EPDF ensures a tardiness of at most q quanta if the
weight of each task is at most (q+1)/(q+2).
– Weight  2/3  tardiness  1
• Without any restrictions, tardiness under EPDF is at
most
 T .e 
max( 1, max 
 1)  max (T .e)

T 
T 
 T . p  T .e 
WPDRTS ‘04
20
Counterexample
• Tardiness under EPDF may exceed 1
quantum.
– 10 processors
– 13 tasks
• 4 tasks of weight 1/2
• 3 tasks of weight 3/4
• 6 tasks of weight 23/24
– A subtask can miss its deadline by two at time 48.
• Examples of task systems with tardiness of 3
and 4 are provided in the paper.
WPDRTS ‘04
21
System Lag – LAG
• Difference between the total allocation that 
receives over [0, t) in the ideal and actual
schedules.
• Simply, the sum of the lags of individual
tasks.
• LAG(, t) =  lag(T, t)
T
WPDRTS ‘04
22
Proof Sketch (Tardiness of 1)
• Theorem to prove:
– EPDF ensures a tardiness of at most one quantum
for a GIS task system  on M processors if the
following hold.
• (T   :: wt(T)  2/3)
• ( Twt(T)  M)
• Proof by contradiction.
WPDRTS ‘04
23
Proof Sketch (Tardiness of 1)
• Let td be the earliest time that a subtask in a  misses its
deadline by 2 under EPDF.
h idle processors
Setup similar
to that of
Srinivasan and
Anderson
At most M-h tasks are
scheduled at t
Lags of tasks not scheduled
at t is 0 or less at t+1
misses deadline
by 2
Suffices to determine the lags
at t+1 of the M-h tasks scheduled
0
1
LAG = 0
WPDRTS ‘04
…
t
LAG < M+1
t+1
…
LAG  M+1
td
LAG  M+1
24
Proof Sketch (Tardiness of 1)
Task T scheduled
at t
Recall:
h idle processors
T1
CASE 1:
d(Ti) > t+1
3
8
T2
3
8
1
8
3
8
T3
3
8
2
8
3
8
3
8
1
8
2
8
lag(T, t+1) < 0
0
1
LAG = 0
WPDRTS ‘04
…
t
LAG < M+1
t+1
…
LAG  M+1
td
LAG  M+1
25
Proof Sketch (Tardiness of 1)
Task T scheduled
at t
Recall:
h idle processors
T1
CASE 2:
d(Ti) = t+1
3
8
T2
3
8
1
8
3
8
T3
3
8
2
8
3
8
3
8
1
8
2
8
lag(T, t+1) = 0
lag(T, t+1) < wt(T)
0
1
LAG = 0
WPDRTS ‘04
…
t
LAG < M+1
t+1
…
LAG  M+1
td
LAG  M+1
26
Proof Sketch (Tardiness of 1)
Task T scheduled
at t
Recall:
h idle processors
lag(T, t+1) = wt(T)
CASE 3(a):
d(Ti) = t
T1
3
8
T2
3
8
1
8
3
8
T3
3
8
2
8
3
8
3
8
1
8
2
8
lag(T, t+1) = 1
0
1
LAG = 0
WPDRTS ‘04
…
t
LAG < M+1
t+1
…
LAG  M+1
td
LAG  M+1
27
Proof Sketch (Tardiness of 1)
Task T scheduled
at t
h idle processors
lag(T, t+1) = 1+f(Ti+2,t)
CASE 3(b):
d(Ti) = t
Recall:
Ti+2
T1
3
8
T2
3
8
1
8
3
8
T3
3
8
2
8
3
8
3
8
1
8
2
8
Ti+1
Ti
If the weight of each task is at most 2/3, then
f(Ti+2, t)the
is maximized
if Ti isofthe
subtask
of a job.
sum of the lags
thefirst
tasks
scheduled
at t is less than M+1.
However, we show that the number of such subtasks is
bounded!
0
1
LAG = 0
WPDRTS ‘04
…
t
LAG < M+1
t+1
…
LAG  M+1
td
LAG  M+1
28
Other Results
• The same proof is generalized for a tardiness
of q.
• Can be used to show that tardiness of an
arbitrary feasible task set is less than
maximum of the execution times over all the
tasks.
Can the weight restrictions be improved??
WPDRTS ‘04
29
Summary
• Showed that tardiness under EPDF can
exceed 1 quantum.
• Improved per-task weight restrictions for
bounded tardiness under EPDF.
• Other related work:
– Supporting multiple tardiness classes
– Bounds on schedulable utilization of EPDF
WPDRTS ‘04
30