Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ch 4. Periodic Task Scheduling

Similar presentations


Presentation on theme: "Ch 4. Periodic Task Scheduling"— Presentation transcript:

1 Ch 4. Periodic Task Scheduling

2 Notations

3 The set of periodic tasks is denoted by
The release time ri,k of i,k The absolute deadline di,k of i,k

4 Processor Utilization
Given a set  of n periodic tasks, the processor utilization U is the fraction of processor time spent in the execution of the task set. The fraction of processor time spent in executing task i = Ci/Ti. Processor utilization : The processor utilization factor provides a measure of the computational load on the CPU due to the periodic task set.

5 Ulub (A) : the least upper bound
Uub (, A) : the upper bound of the processor utilization for a task set  under a given algorithm A  is schedulable by A, but an increase in the computation time in any of the tasks will make the set infeasible. Ulub (A) : the least upper bound For a given algorithm A, Ulub(A) is the minimum of the utilization factors over all task sets

6 Ulub defines an important characteristics of a scheduling algorithm because it allows to easily verify the schedulability of a task set. An task set whose utilization is below Ulub is schedulable by the algorithm.

7 Rate Monotonic (RM) Scheduling
Task with higher request rates (that is, with shorter periods) will have higher priorities. Since periods are constant, RM is a fixed-priority assignment. Priorities are assigned to tasks before execution and do not change over time. RM is preemptive: the current executing task is preempted by a newly arrived task with shorter period.

8 Example 1 (1, C1, D1, T1) = (0, 1, 3, 3) 2 (2, C2, D2, T2) = (2, 2, 5, 5) 3 (3, C3, D3, T3) = (1, 1, 6, 6) 1 2 3

9 Optimality of RM In 1973, Liu and Layland showed that
RM is optimal among all fixed priority assignments in the sense that no other fixed-priority algorithms can schedule a task set that cannot be scheduled by RM. Proof of Optimality

10 Ulub of RM Calculation of Ulub for two tasks
Calculation of Ulub for n tasks

11 Remarks on RM RM is optimal among all fixed-priority assignments in the sense that no other fixed-priority algorithms can schedule a task set that cannot be scheduled by RM. RM guarantees that an arbitrary set of periodic tasks is scheduliable if the total processor utilization U is not exceed a value of 0.69. This schedulability condition is sufficient to guarantee the feasibility of any task set, but it is not necessary.

12 Earliest Deadline First (EDF)
EDF dynamically selects tasks according to their absolute deadlines. Tasks with earlier deadlines are executed at higher priorities. The absolute deadline of the j-th instance of task i EDF is a dynamic priority assignment and preemptive.

13 Example 1 (1, C1, D1, T1) = (0, 2, 5, 5) 2 (2, C2, D2, T2) = (0, 4, 7, 7) 1 2

14 Schedulability Analysis
A set of periodic tasks is schedulable with EDF if and only if Proof

15 Deadline Monotonic The Deadline Monotonic (DM) priority assignment extends RM for the system where tasks can have a relative deadline less than their period. Each task i is characterized by four parameters: i Ci Di Ti

16 According to the DM algorithm, each task is assigned a priority inversely proportional to its relative deadline. Since relative deadlines are constant, DM is a fixed-priority assignment and preemptive. DM is optimal in the sense that, if any fixed-priority assignment scheduling algorithm can schedule a set of tasks with deadlines unequal to their periods, then DM will also schedule task set.

17 Schedulability of DM The feasibility of a set of tasks with deadlines unequal to their periods could be guaranteed by RM schedulability test: However, it would not be optimal as the workload on the processor would be overestimated.

18 Schedulability Analysis
Assuming that tasks are ordered by increasing relative deadlines, so that A test is given by Ii : the interference on i which can be computed bas the sum of the processing times of all higher-priority tasks released before Di

19 Sufficient and Necessary Schedulability Test
The previous test is sufficient but not necessary for guaranteeing the schedulability. Ii is calculated by assuming each higher-priority task j exactly interferes Di/Tj times on i. The actual interference can be smaller than Ii.

20 The longest response time Ri of a periodic task i is computed, at the critical instance, as the sum of its computation time and the interference due to preemption by higher-priority tasks: where Hence,

21 Algorithm for testing schedulability

22 EDF with Deadlines Less Than Periods
Theorem 4.2 A set of periodic tasks is schedulable by EDF if and only if for all L, L  0,

23 Problems to solve Solve the following exercise problems in the textbook. 4.1 4.2 4.3 4.4 4.8


Download ppt "Ch 4. Periodic Task Scheduling"

Similar presentations


Ads by Google