Chapter 4 – Periodic Task Scheduling In many real-time systems periodic tasks dominate the demand. Three classic periodic task scheduling algorithms: – Time Line (Cyclic) – Rate Monotonic – Earliest Deadline First What is the landscape here? What causes the challenges?
Periodic Task Scheduling Notation T i denotes the period of task i C i denotes the Computation time for one instance of task i
Periodic Task Scheduling Assumptions
Additional Periodic Task Parameters
Processor Utilization Factor - U < 1 if set is scheduable Let be the upper bound of the processor utilization factor for a set under a given algorithm A. When the set is said to fully utilize the processor. 1
Time Line Scheduling (Cyclic Scheduling) Time Line Scheduling (Off-line scheduling strategy)– Divide the time line into time slices for scheduling tasks, e.g. use the Greatest Common Divisor of the Task Periods as the time slice: 40 Hz 20 Hz 10 Hz Schedulability is guaranteed if: Time line scheduling is sensitive to changes in the task parameters. Can time line scheduling also accommodate aperiodic tasks ?
Rate Monotonic Scheduling RM is optimal among all fixed Priority assignment schedules. Why? How can you how show that it must be optimal? Which is clearly non-optimal
Rate Monotonic – Calc of U LUB for Two Tasks Let, the number of Then the schedule produced by RM satisfies one of two conditions: The critical time zone is for U ub
Earliest Deadline First Proof: Assume U > 1 and the task set is schedulable. This leads to a contradiction:
Example: Comparing RM to EDF Since U > ln 2 = 0.69, Schedulability can’t be guaranteed using Rate Monotonic
Homework #4 Lecture 5/1 1) Verify the schedulability under RM of the following task set: CiCi TiTi 14 26 38 2) Verify the schedulability under EDF, and then construct the corresponding schedule. Due May 8
Mutual Exclusion Problems
Priority Ceiling protocol: –The priority ceiling PC(S) is the highest priority of all processes that may lock S. –A task P that attempts to lock a semaphore will be suspended unless its priority is higher than PC(S) for all S currently locked by all tasks Q not= P. –If P is suspended, then the task Q that holds the lock with the highest PC is considered to be blocking P. Q then inherits P’s priority.
Mutual Exclusion Problems
Again, using Priority Ceiling