




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!





Definitions of tasks, task invocations, release/arrival time, absolute deadline, relative deadline, period, start time, finish
time, …
Preemptive versus non-preemptive scheduling
Priority-based scheduling
Static versus dynamic priorities
Main problem: Find Bound for scheduling policy such that
U < Bound All deadlines met!
Bound EDF
bound
bound
bound
Task 1 P 1
1
Task 2
P 2 = C 2
2
2
1
1
0 1 2 3 4 5 6 time
Question: is there a threshold U bound such that
When U < U bound deadlines are met
When U > Ubound deadlines are missed
Task 1
P 1 =
C 1 =
Task 2
P 2
2
2
1
1
0 1 2 3 4 5 6 time
Question: is there a threshold Ubound such that
When U < Ubound deadlines are met
When U > Ubound deadlines are missed
Task 1
P 1 =
C 1 =
Task 2
P 2
2
2
1
1
0 1 2 3 4 5 6 time
Missed deadline!
Unschedulable
Question: is there a threshold Ubound such that
When U < Ubound deadlines are met
When U > Ubound deadlines are missed
Task 1
P 1 =
C 1 =
Task 2 P 2
2
2
1
1
0 1 2 3 4 5 6 time
Question: is there a threshold Ubound such that
When U < Ubound deadlines are met
When U > U bound deadlines are missed
Task 1
P 1 =
C 1 =
Task 2 P 2
2
2
1
1
0 1 2 3 4 5 6 time
Question: is there a threshold Ubound such that
When U < Ubound deadlines are met
When U > U bound deadlines are missed
Task 1 P 1
1
Task 2
P 2 = C 2
2
2
1
1
0 1 2 3 4 5 6 time
Schedulable!
Question: is there a threshold U bound such that
When U < U bound deadlines are met
When U > Ubound deadlines are missed
Task 1 P 1
1
Task 2
P 2 = C 2
2
2
1
1
0 1 2 3 4 5 6 time
Schedulable!
Question: is there a threshold U bound such that
When U < U bound deadlines are met
When U > Ubound deadlines are missed
Schedulability depends on task set!
No clean utilization threshold between schedulable and unschedulable
task sets!
Find some task set parameter x
such that
Case (a): x<xo U(x) decreases with x Case (b): x>x o U(x) increases with x
Thus U(x) is minimum when x=xo
Find U(xo)
2
Task 1
Task 2
Find some task set parameter x
such that
Case (a): x<xo U(x) decreases with x Case (b): x>x o U(x) increases with x
Thus U(x) is minimum when x=xo
Find U(xo)
Task 1
Task 2
Find some task set parameter x such that
Case (a): x<xo U(x) decreases with x Case (b): x>x o U(x) increases with x
Thus U(x) is minimum when x=x o Find U(xo)
Task 1
Task 2
Critically schedulable
total = C 2
Find some task set parameter x such that
Case (a): x<xo U(x) decreases with x Case (b): x>x o U(x) increases with x
Thus U(x) is minimum when x=x o Find U(xo)
1
1
Task 1
Task 2
Find some task set parameter x
such that Case (a): x<x o U(x) decreases with x
Case (b): x>xo U(x) increases with x
Thus U(x) is minimum when x=xo Find U(x o
1
1
Task 1
Task 2
1 1
2 2
Find some task set parameter x
such that Case (a): x<x o U(x) decreases with x
Case (b): x>xo U(x) increases with x
Thus U(x) is minimum when x=xo Find U(x o
Case (a):
2
Task 1
Task 2
Case (b):
2
1 1
2 2 P P
1
2 2 P P
Find some task set parameter x
such that
Case (a): x<xo U(x) decreases with x Case (b): x>x o U(x) increases with x
Thus U(x) is minimum when x=xo
Find U(xo)
Case (a):
2
Task 1
Task 2
1 1
2 1 2 P P
Case (b):
2
1 1
2 1 2 P P
Find some task set parameter x
such that
Case (a): x<xo U(x) decreases with x Case (b): x>x o U(x) increases with x
Thus U(x) is minimum when x=xo
Find U(xo)
Case (a):
Task 1
Task 2
1 1
2 1 2
Case (b):
1 1
2 1 2 P P
1 Find some task set parameter x such that
Case (a): x<xo U(x) decreases with x Case (b): x>x o U(x) increases with x
Thus U(x) is minimum when x=x o Find U(xo)
Case (a):
Task 1
Task 2
1 1
2 1 2
Case (b):
1 1
2 1 2 P P
1 Find some task set parameter x such that
Case (a): x<xo U(x) decreases with x Case (b): x>x o U(x) increases with x
Thus U(x) is minimum when x=x o Find U(xo)
Case (a):
1
1
Task 1
Task 2
1 1
2 1 2
Case (b):
1
1
1 1
2 1 2 P P
Find some task set parameter x
such that Case (a): x<x o U(x) decreases with x
Case (b): x>xo U(x) increases with x
Thus U(x) is minimum when x=xo Find U(x o
Case (a):
1
1
Task 1
Task 2
1 1
2 1 2
Case (b):
1
1
1 1
2 1 2 P P
1
2 2 2 1 P
1
2 2 (^11 ) P
1
2
1
2
2
1
2
2
1
1
P
1
2
1
2
2
1
1
2
2
1
P
3
3
2
1
2
d
dU 0
2
3
d
dU 0
3
4
d
dU
3
3
2
2
1
1 = + + + P
n
i
i
1
1 n
Adjust arrival times and deadlines
Memory
Disk
Access to shared data structures
etc.
Space-multiplexed (e.g., memory: different tasks have different
parts of the resource)
Time multiplexed (one task can access at a time)
Serial: Two tasks can’t interleave their accesses (e.g., lock-protected
data structures)
Lock S Unlock S
Lock S
Unlock S
Critical sections
(Mutually exclusive)
Task 1
Task 2
High-priority task
Low-priority task
Lock S
Preempt.
High-priority task
Low-priority task
Lock S
Attempt to lock S
results in blocking
Preempt.
Priority Inversion
High-priority task
Low-priority task
Lock S
Attempt to lock S
results in blocking
Preempt.
Unlock S
Lock S
Unlock S
Priority Inversion
High-priority task
Low-priority task
Lock S
Preempt.
Intermediate-priority tasks
Preempt.
Unbounded Priority Inversion
Attempt to lock S results in blocking
High-priority task
Low-priority task
Lock S
Preempt.
Intermediate-priority tasks
Preempt.
Unbounded Priority Inversion
Attempt to lock S results in blocking