- Scheduling Algorithms for Multiprogramming in a Hard-Real-Time Environment
 
- periodic tasks, strict priority, immediate preemption
 
- describe task  with period  and work , utilization 
 
- 
example
| 
 | 
T | 
C | 
U | 
| 1 | 
10 | 
2 | 
0.2 | 
| 2 | 
5 | 
2 | 
0.4 | 
| 3 | 
3 | 
1 | 
1/3 | 
 
- 
question: is set of tasks & priorities feasible?
 
- simulate "critical instant": largest response time
        - task request simultaneously with all higher priority tasks
        - -esponse time: completion time - arrival time
 
- 
simulate execution up to first deadline of lowest priority task
- confirm that all requests (jobs) meet their deadlines: necessary and sufficient
- necessary because eventually all tasks will arrive at the same time
 
- sufficient because this checks the worst-case response time of all tasks
 
 
| 
 | 
T | 
C | 
U | 
 | 
1 | 
2 | 
3 | 
4 | 
5 | 
6 | 
7 | 
8 | 
9 | 
10 | 
Priority | 
| 1 | 
10 | 
2 | 
0.2 | 
 | 
1 | 
1 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
| 2 | 
5 | 
2 | 
0.4 | 
 | 
2 | 
2 | 
 | 
 | 
 | 
2 | 
2 | 
 | 
 | 
 | 
 | 
| 3 | 
3 | 
1 | 
1/3 | 
 | 
3 | 
 | 
 | 
3 | 
 | 
 | 
3 | 
 | 
 | 
3 | 
 | 
 | 
 | 
 | 
 | 
 | 
3 | 
2 | 
2 | 
3 | 
1 | 
2 | 
3 | 
2 | 
1 | 
3 | 
3 > 2 > 1 | 
 | 
 | 
 | 
 | 
 | 
2 | 
2 | 
3 | 
3 | 
1 | 
2 | 
2 | 
3 | 
1 | 
3 | 
2 > 3 > 1 | 
 | 
 | 
 | 
 | 
 | 
1 | 
1 | 
2 | 
X | 
 | 
 | 
 | 
 | 
 | 
 | 
1 > 2 > 3 | 
 
- 
how to assign priorities?
 
- 
rate-monotonic (RM) scheduling
- assign priorities according to arrival rate (not utilization!)
 
- if , RM schedule guarantees deadlines
 
- bound approaches  (from the top)
 
- no simulation needed
 
- this is a sufficient test, not a necessary one
- task sets with higher utilizations might be schedulable
 
- example task set has higher utilization, but is still schedulable
 
 
- optimal scheduling scheme for static priorities
 
 
- 
harmonic task set: each tasks period's is exact multiple of next most frequent task 
  → 100% utilization possible with RM scheduling
 
- 
dynamic priorities: earliest deadline first (EDF) scheduling
  → 100% utilization possible
- optimal scheduling algorithm
 
- but  computional overhead each time
 
| 
 | 
T | 
C | 
U | 
 | 
1 | 
2 | 
3 | 
4 | 
5 | 
6 | 
7 | 
8 | 
9 | 
Schedule | 
| 1 | 
8 | 
1 | 
0.125 | 
 | 
1 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
1 | 
 | 
| 2 | 
5 | 
3 | 
0.6 | 
 | 
2 | 
2 | 
2 | 
 | 
 | 
2 | 
2 | 
2 | 
 | 
 | 
| 3 | 
4 | 
1 | 
0.25 | 
 | 
3 | 
 | 
 | 
 | 
3 | 
 | 
 | 
 | 
3 | 
 | 
 | 
 | 
 | 
 | 
 | 
3 | 
2 | 
2 | 
2 | 
3 | 
2 | 
2 | 
2 | 
X | 
RM | 
 | 
 | 
 | 
 | 
 | 
3 | 
2 | 
2 | 
2 | 
3 | 
1 | 
2 | 
2 | 
2 | 
EDF (*) | 
- (*)  and  in any oder in Interval 5 & 6
 
 
- 
overload behaviour
- rate-monotonic: starvation
 
- EDF: no guarantees