Xiang Yong, Chen Yu, Li Guoliang, Ren Ju
Spring 2023
Outline
Static Priority Scheduling: Rate Monotonic(RM) Algorithm
Dynamic Priority Scheduling: Earliest Deadline First(EDF) Algorithm
If there is shared resource occupation between tasks, tasks with high priority may be delayed!
Determine the task priority based on task periods (the shorter the period, the higher the priority, preemptive)
Process P1: e=20 p=50
Process P2: e=35 p=100
Process P1: e=25 p=50
Process P2: e=35 p=80
Issues of Fixed priority: some tasks may miss the deadline
Process P1: e=10 p=20
Process P2: e=25 p=50
Determine task priority according to task urgency or laxity level
The higher the urgency, the higher the priority.
Laxity = Deadline - Execution Time - Current Time
Process P1: e=10 p=20; Process P2: e=25 p=50
The phenomenon of a high-priority process waiting for a resource occupied by a low-priority process for a long time.
Priority: T1>T2>T3
Note: Critical section refers to a code segment that accesses shared resources in a mutually exclusive manner.