













Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!














process model process model process model
(a) Precedence (b) Communication (c) Disjoint
Note: Dashed lines represent processor boundaries
Ideal speed-up
Si =
× n
∑m i=1 Pi OSP T
∑m i=1 Pi OCP Tideal × n
System degradation
Sd =
1 + ρ
ρ =
CP T − OCP Tideal OCP Tideal
optimal scheduling
ρ
ρ (^) sched
ρ
ρ
syst (^) syst
sched
ρ
nonoptimal
nonoptimal
ideal system with
real system with
scheduling
real system with optimal scheduling
ideal system with
scheduling
Finally,
S =
1 + ρ
× n
A/6 B/5 C/
D/6 E/6 F/
G/
1
4 3 3 (^1 )
1 2 1
0 2 0
1 1
P
P
P
0
(a) Precedence process model (b) Communication system model
P
P
P
A/6 D/6 G/
B/5 F/
C/
7
2 E/6 4
P
P
P
A/
B/
C/
2
2
10
D/
F/
E/
10 G/
17
8
A/6 E/
B/
C/
2 D/
4 F/4 6
G/
6
1
P
P
P
(c) ETF
(b) ELS
(a) LS
Makespan = 18
Makespan = 28
Makespan = 16
Note that List Scheduling has a lower makespan because it does not charge for communication costs at all (it represents a best case). Also note that LS, Extended LS, and Earliest Task First are heuristics, and may not give an optimal schedule.
Communication process model
1 2
3
4
5
6
6
8 4
12
11
12
3 5
(a) Computation cost (b) Communication cost
Process 1 2 3 4 5 6 5 2 4 6 5 infinity
4 3 2 4
infinity
10
Cost on A Cost on B
1
2
3
4
5
6
6
8 4
12
11
12
3 5 2
3
4
10
4
inf. inf.
2
5
4 6
5
Cut Set Cost = 38
A B
For min-cut algorithms, see http://en.wikipedia.org/wiki/Ford-Fulkerson algorithm, and http://en.wikipedia.org/wiki/Edmonds-Karp algorithm
Dashed line = cost to run task on other processor (Task T in same set as A runs on A, so total cost must include cost of running T on A.)
Cluster tasks by Communication Threshold C Limit # tasks (or computation cost) on processor by Task Threshold X
Objective: minimize cutset cost, representing aggregate cost (communication plus processing). May lead to significant imbalance in processor loads.
Hybrid algorithms and their performance
System Load
Turnaround Time
receiver−initiated
sender−initiated
algorithm
algorithm
no load sharing
M/M/
Remote service
Remote execution
The remote operation initiated by a client is created by the client for resource or load sharing (processor-pool model).
Soft/hard deadlines, periodic/aperiodic, priority scheduling
Task τi described by τi = (Si, Ci, Di)
Si = earliest start time Ci = worst case execution time Di = deadline
(Aperiodic) Realtime Task Set V is
V = {τi | i = 1, 2 , ..., n}
Periodic Realtime Task Set V is
V = {Ji = (Ci, Ti) | i = 1, 2 , ..., n}
Ci = worst case execution time Ti = period
Schedule A is set of execution intervals
A = {(si, fi, ti) | i = 1, 2 , ..., m}
si = start time of interval i fi = finish time of interval i ti = task executed during interval i
A is valid iff:
A schedule A is feasible iff every task receives at least Ck time in A A RT Task Set V is feasible iff there is a feasible schedule for it.
Priority scheduling
Static Priority Assignment
Critical Instant
t t+T^ t^ t+T
Time t
Critical instant for
4
τ 3
τ
τ 2
τ 1
l
t ε
τ h τ h
Release τ h at t+ ε Release τ h at
l
τ 5
τ 5
Scheduling a higher priority task earlier or later can only make its demand on the processor less.
A sufficient (but not necessary) condition for feasible RM schedule, Load L is:
L =
∑^ n
i=
Ci Ti
≤ n(2^1 /n^ − 1)
which approaches 0.69 as n becomes large. This is pessimistic.
Response time ri of task i must satisfy:
ri = Ci +
i∑− 1
h=
ri Th
⌉Ch ≤ Ti
Find ri iteratively (start with ri(0) = Ci), and if ever ri(k) > Ti for some iteration k, then fail. If ri(k) = ri(k − 1) <= Ti for some iteration k, then we have reached a fixed point and the RM schedule is feasible.
Deadline Monotonic (DM) priority assignment
When periodic task deadlines are sooner than next start time
V = {Ji = (Ci, Ti, Di) | i = 1, 2 , ..., n}
Ci = worst case execution time Ti = period Di = incremental deadline (if arrive at t, must finish by t + Di)
Dh < Di then P rh > P ri
Optimal for static priority assignments for short deadline periodic tasks
Earliest Deadline First (EDF) priority assignment
Optimal dynamic scheduling
dh(j) < di(k) then P rh(j) > P ri(k)
dh(j) = deadline for jth^ instance of task h P rh(j) = priority for jth^ instance of task h
Direct and Push-through Blocking: τh suffers direct blocking; τm suffers push-through blocking due to PIP (this is desired).
S S
S S
lock unlock
lock unlock
l
m
τ h
τ
τ
Let us find Bh = maximum time τh will be blocked
Task-oriented perspective:
Bh ≤
∑
{l|P rl<P rh}
Eh(l)
Eh(l) = maximum execution time of any critical section in Blh(l) Blh(l) = set of all critical sections of τl that can block τh (directly, indirectly, or push-through)
Lock-oriented perspective: Since a higher priority task can only be blocked once by a lower priority task per semaphore S, Bh ≤
∑
{S|ceil(S)≥P rh}
Eh(S)
Eh(S) = maximum execution time of any critical section of a task with lower priority than τh that can block τh through S Priority ceiling of S, ceil(S) = max{P rh|τh can be blocked by S}. If no nested critical sections, then ceil(S) = max{P rh|τh locks S}.
So, for schedulability, take the smaller upper bound Bh. A sufficient condition for a feasible RM assignement is then:
∑^ h
j=
Cj Tj
Bh Th
≤ h(2^1 /h^ − 1)
More specifically, compute response time ri for each task i iteratively:
ri(0) = Ci + Biri(k + 1) = Ci + Bi +
∑^ i−^1
h=
ri(k) Th
⌉Ch ≤ Ti
If ever ri(k) > Ti for some iteration k, then fail. If ri(k) = ri(k − 1) <= Ti for some iteration k, then we have reached a fixed point and the RM schedule is feasible.
However, we are allowing a task to be blocked by more than one lower priority task or lock, making schedulability less certain....