Computing the completion time

THE DEADLINE-BASED SCHEDULING
OF DIVISIBLE REAL-TIME
WORKLOADS ON MULTIPROCESSOR
PLATFORMS
Suriayati Chuprat
Supervisors:
Professor Dr Shaharuddin Salleh
Professor Dr Sanjoy K. Baruah
INSPIRING CREATIVE AND INNOVATIVE MINDS
Presentation Contents
• Introduction
• Summary of Contributions
• Anomalous Observations & Theoretical
Explanations
• Optimal Algorithm --MINPROCS
• LP-Based Algorithm --MIN-ξ
• Conclusions
INSPIRING CREATIVE AND INNOVATIVE MINDS
Introduction
• Formal models for representing real-time
workloads
– Uniprocessor environments
– One particular restriction: each task may execute
upon at most one processor at each instant in
time.
– Liu pointed out [8], “the simple fact that a [job]
can use only one processor even when several
processors are free at the same time adds a
surprising amount of difficulty to the
scheduling of multiple processors"
Real-time DLT
• Divisible workload,
J i  ( Ai ,  i , Di )
– Arrival time, Ai ≥ 0
– Total data size of a job, i>0
– Relative deadline, Di>0, Ai+Di
• DLT allows for the simultaneous execution
of a job upon multiple processors
Real-time DLT
• DLT Computing Cluster
= (N, Cp, Cm)
• N – Number of processing nodes
• Cp – Time taken to process
• Cm – Time taken to transmit
P0
P1
P2
P3
…
PN
Real-time DLT
J  ( A,  , D)
P0
11C
Cmm
22C
Cmm
3C
m3Cm
P1
nCm
nCm

1C
p p
1C
P2
2C
2C
pp
P3
3C
3C
p p
Pn
1 
  ( , n) 
 (C C C p )
n C  m
1 
n
r1
r2
r3
p
n
p
rn
Data transmission and execution time=C
diagram
p/(Cp+Cm)
when processors have different ready times
Computing Min-N
• “Given a divisible load of size  and
processor ready-times r1, r2 ,…, what is the
minimum number of processors needed to
meet a job’s deadline?”
• Approach by Lin et al. in [9]
– Abstraction of heterogeneous clusters
– Approximation
• Non-optimal
Computing Min-N
• When allocating processors in order to meet a divisible
job's deadline , a scheduling algorithm must know the
minimum number required by the job
• When all the processors are allocated simultaneously,
recall that the completion time is given by:
1 
  ( , n) 
 (Cm  C p )
n
1 
• The minimum number of processors needed is computed
from this equation by setting this completion time to the
job's deadline (A + D)
Computing Min-N
• When the processors have different ready times, using
the previous approach is more challenging
• Lin et al. (9,7)
– Map processors to heterogeneous clusters of virtual
processors with different speeds (Cpi )
– Derive a formula to determine Cpi as
C pi 
 ( , n)
 ( , n)  rn  ri
,
– Approximation ** there is a circularity of reasoning going on
here
Algorithm--MINPROCS
MINPROCS(  ,  )
1
si  ri ; alloc  0; i  1
2
while (true) do
3
if ( alloc  1 ) break end if
4
if ( si   ) break end if
5
 i  (  si )  (  (Cm  C p ))
6
si 1  max(ri 1 , si    Cm  i )
7
alloc  alloc   i
8
i  i 1
end while
9
if ( alloc  1 ) then
success!!
nmin  i
10
else
cannot meet the deadline, regardless of the number of processors used
nmin  
11
end if
Simulation Results
Cm=1, Cp=100, N=32, LoadSize=50, Arrival=100
Our Algorithm
– x
50
Lin et al. Algorithm
40
30
20
10
Number of Processors
Number of Processors
Cm=1, Cp=100, N=16, LoadSize=50, Arrival=100
0
Our Algorithm
14
12
Lin et al. Algorithm
10
8
6
4
2
0
1000 1005 1015 1030 1050 1075 1105 1140 1180 1225
1000 1005 1015 1030 1050 1075 1105 1140 1180 1225
Deadlines
Deadlines
Cm=1, Cp=100, N=32, Deadline=2500, Arrival=100
Our Algorithm
20
Number of Processors
Number of Processors
Cm=1, Cp=100, N=16, Deadline=2500, Arrival=100
Lin et al. Algorithm
15
10
5
0
Our Algorithm
50
Lin et al. Algorithm
40
30
20
10
0
50
53
59
68
80
95
Load Size
113
134
158
185
50
53
59
68
80
95
Load Size
113
134
158
185
Simulation Results
Cp=100, N=16, LoadSize=50, Deadline=2500, Arrival=100
Cp=100, N=32, LoadSize=50, Deadline=2500, Arrival=100
Our Algorithm
– x
Number of Processors
Number of Processors
Our Algorithm
12
Lin et al. Algorithm
10
8
6
4
2
0
Lin et al. Algorithm
10
8
6
4
2
0
1
2
3
4
5
6
7
8
9
10
3
4
5
6
7
8
9
10
Cm
Cm=1, N=16, LoadSize=50, Deadline=2500, Arrival=100
Cm=1, N=32, LoadSize=50, Deadline=2500, Arrival=100
Our Algorithm
Lin et al. Algorithm
20
15
10
5
0
50
2
Cm
Our Algorithm
25
1
Number of Processors
Number of Processors
12
60
70
80
90
100
Cp
110
120
130
140
16
14
12
10
8
6
4
2
0
Lin et al. Algorithm
50
60
70
80
90
100
Cp
110
120
130
140
Computing Completion Time
• “Given a divisible load of size  and n (identical)
processors with ready-times r1,…, rn upon which
to execute it, what is the earliest time at which 
can complete execution?”
• Approach by Lin et al. in [9]
– Abstraction to heterogeneous clusters
– Compute the fractions of load to be assigned to each
virtual processor
– Compute the completion time
• Non-optimal
Computing Completion Time
i: fraction of load assigned to Pi
____________________________________________________________________
ri: ready time of Pi
si: time data transmission begin to Pi
: Completion time
minimize 
subject to the following constraints:
(1)
1   2  ...   n  1
(2)
0  i
1 i  n
(3)
ri  si ,
1 i  n
(4)
si  i Cm  si 1 ,
1 i  n
(5)
si   i (Cm  C p )   ,
1 i  n
____________________________________________________________________
Computing the completion time: LP formulation
Computing Completion Time
N=4, Cm=1, Cp=100
N=6, Cm=1, Cp=100
3500
N=8, Cm=1, C=100
3000
2400
LP Solution
Approx Solution
LP Solution
Approx Solution
3000
2500
2000
2000
Completion Time
1800
Completion Time
2500
Completion Time
LP Solution
Approx Solution
2200
2000
1500
1500
1600
1400
1200
1000
1000
1000
800
500
30
40
50
60
70
80
90
Load Size
100
110
120
500
30
130
40
50
60
N=12, Cm=1, Cp=100
70
80
90
Load Size
100
110
120
600
30
130
50
60
N=16, Cm=1, Cp=100
2000
70
80
90
Load Size
100
110
120
130
120
130
140
150
N=20, Cm=1, Cp=100
2200
2100
LP Solution
Approx Solution
LP Solution
Approx Solution
1800
40
LP Solution
Approx Solution
2000
2000
1900
1600
1400
1200
1800
Completion Time
Completion Time
Completion Time
1800
1600
1400
1700
1600
1500
1000
1400
1200
800
600
30
1300
40
50
60
70
80
90
Load Size
100
110
120
130
1000
50
60
70
80
90
100
110
Load Size
120
130
140
150
1200
50
60
70
80
90
100
110
Load Size
Conclusion
• RT-DLT has the potential to provide a solid theoretical
foundation to real-time distributed clusters
• We have studied two scheduling problems in RT-DLT
when applied to clusters with different available times:
– How does one compute the minimum number of processors
needed to meet a job's deadline?
– Given a number of processors, how does one determine the
earliest completion time for the job on this many processors?
• For both problems, we provide exact solutions