Maximum Schedulable Utilization

In this section, we have studied about Maximum Schedulable Utilization which includes schedulable utilization of EDF algorithm, schedulable test for the EDF algorithm. We also discussed a little bit about the optimality of RM and DM algorithm including some theorems.

Summary

In this section, we have studied about Maximum Schedulable Utilization which includes schedulable utilization of EDF algorithm, schedulable test for the EDF algorithm. We also discussed a little bit about the optimality of RM and DM algorithm including some theorems.

Things to Remember

  1. The Earliest-Deadline-First (EDF) algorithm assigns priorities to individual jobs in the tasks according to their absolute deadlines.
  2. The Least Slack Time (LST) scheduler checks the slacks of all the ready jobs each time a new job is released and orders the new job and the existing jobs on the basis of their slacks: the smaller the slack, the higher the priority.
  3. We call a test for the purpose of validating that the given application system can indeed meet all its hard deadlines when scheduled according to the chosen scheduling algorithm a schedulability test.
  4. We can use the schedulability condition of the EDF algorithm as a rule to guide the choices of the periods and execution times of the tasks while we design the system.

 

MCQs

No MCQs found.

Subjective Questions

No subjective questions found.

Videos

No videos found.

Maximum Schedulable Utilization

Maximum Schedulable Utilization

Maximum Schedulable Utilization

Any system is schedulable by an algorithm if the algorithm always produces a feasible schedule of the system. It is possible to schedule (and feasible) only if the feasible schedule of the system exists. Maximum total utilization means the maximum total utilization of the system in order for the system to be surely schedulable.

Schedulable Utilization of EDF Algorithm

We know that a periodic task Ti is denoted by 4-tuple (φi, Pi, ei, Di) with utilization ui = ei/Pi.

The total utilization of the system

A scheduling algorithm can feasibly schedule any system of periodic tasks on a processor if U is equal to or less than the maximum schedulable utilization of the algorithm (UALG) and if UALG = 1, then the algorithm is optimal.

UALG id important because it gives a schedulability test where a system can be validated by showing that U <= UALG.

Theorem:

A system of independent, preemptable periodic tasks with relative deadlines equal to their respective periods (i.e. Di=Pi) can be feasibly scheduled on one processor if and only if its total utilization is equal to or less than 1 (U <= 1).

Proof:

Consider that the relative deadline of every task is equal to its period, then according to the theorem any such system can be feasibly scheduled if its total utilization is equal to or less than 1, regardless of number of tasks. On the other hand, if any system fails to meet some deadlines, then obviously the total utilization is greater than 1.

Based on above theorem and the discussion, we can say that the periodic tasks with Di = Pi.

The corollary of above theorem states that, the result also holds true if the relative deadline is longer than the period. That means UEDF for independent preemptable periodic tasks with Di >= Pi.

Note: above result is independent of Pi and the result can also be applied to strict LST.

Schedulability Test for the EDF Algorithm

A test that is used to validate that the given systems can indeed meet all its hard deadlines when scheduled according to a chosen scheduling algorithm is called a schedulability test. If this test is efficient, then it is can be used as an on-line acceptance test.

Schedulability test is used to check whether a set of periodic tasks meet all their deadlines.

Suppose,

  1. The periodic (Pi), execution time (ei), and their relative deadline (Di) of every task Ti in a system T = {T1, T2, . . . . , Tn} and
  2. A priority driven algorithm used to schedule the tasks in T preemptively on one processor are given.

In the above given conditions if the phases are also given and if the values of all the given parameters do not vary, the problem can be solved by simulation. For this, we can construct a segment of schedule (time line) of these tasks according to given algorithm. The length of the segment will be equal to 2H + maxi Pi+ maxi Di. If we do not find any missed deadlines in this segment, then Ti will certainly meet its deadlines. But, this method doesn’t work if the parameters vary.

To determine whether the given system of n independent periodic tasks surely meet all the deadlines when scheduled according to preemptive EDF algorithm on one processor, check the following inequality condition called schedulability condition.

If this condition is satisfied, then the system is scheduled according to EDF algorithm. But if this condition is not satisfied, then the following two conclusions can be made which depends on the relative deadline (Di).

  1. If Dk>=Pk for all k from 1 to n, eq. i becomes U<=1, which is both a necessary and sufficient condition for a system to be feasible.
  2. If Dk<Pk for some k, eq. i is only a sufficient condition and so the system may not be schedulable when the condition is not satisfied.

If the actual inter-release times are sometimes longer than Pk, the total demand for processor time will be smaller. Therefore, if according to eq. i the system is schedulable on one EDF basis, it remains schedulable when the inter-release times of jobs in some tasks are sometimes longer than the respective periods of the tasks.

Optimality of RM and DM

RM and DM algorithms assigns fixed priorities to the tasks. So, they can’t be optimal. They may fail to schedule some systems, even though feasible schedule exists. For example, consider two tasks T1 = (2, 1) and T2 = (5, 2.5).

Total utilization (U) = 1/2 + 2.5/5 = 1

Since, U = 1, the task are feasible.

Here, J1,1 and J2,2 can complete in time only if they have a higher priority than J2,1. It means between t = 0 to 4, it must have a higher priority than T2. But at time 4 when J1,3 release, J2,1 can complete in time only if T2(or J2,1) has a higher priority than T1 (or J1,3). This change in the relative priorities of the tasks is not allowed by any fixed priority algorithm.

Any fixed priority algorithm can be optimal in restricted system. RM (DM) algorithm is not optimal for tasks with arbitrary periods. But it is optimal in a special case when the periodic tasks in the system or simply periodic and deadlines of the tasks are not less than their respective periods.

A system of periodic tasks is said to be simply periodic if the period of each is an integer multiple of the periods of the other tasks. That is,

Pk = nPi

Where, Pi<Pk and n is a positive integer for all Ti and Tk.

The following theorem, states that the RM algorithm is optimal for scheduling a system having above condition.

Theorem for optimality of RM Algorithm:

A system of simply periodic independent, preemptable tasks whose relative deadlines are equal to larger than their periods (i.e. Di>=Pi) is schedulable on one processor according to RM algorithm if and only if its total utilization is equal to or less than 1.

Proof:

Assume that in a simple periodic system, all the tasks are in phase (worst case execution time occurs when tasks are in phase). Also, consider that the processor never remains idle before the task Ti misses a deadline at t for the first time, where t is an integer multiple of Pi.

Since, the system is simply periodic, t is also an integer multiple of periods (Pk) of all higher priority tasks (Tk) for k = 1, 2, . . . . , i-1. Therefore, the total time required to complete jobs with deadlines before and at t is

of the highest priority task. It means, Ti misses a deadline at t means that the demand for time exceeds t. in other words, RM fails when Ui>1.

Theorem for Optimality of DM Algorithm.

Generally, fixed priority scheduling is not optimal. But, it gives more predictable and stable system. Among the fixed priority algorithms, DM algorithm is the best and optimal.

Theorem:

A system T of independent preemptable tasks that are in phase and have Di<=Pi can be feasibly scheduled on one processor according to DM algorithm whenever it can be feasibly scheduled according to any fixed priority algorithm.

Proof:

This theorem is true because we can always transform a feasible fixed priority schedule which is not DM into DM schedule.

For example, consider a system having feasible fixed priority schedule which is not a DM schedule.

Now, arrange all the tasks starting from Ti with the shortest Di in order of increasing Di. If there are two tasks Ti and Ti+1 with Di<Di+1 and priority of Ti+1 higher than Ti. In such case, we can switch the priorities of these two tasks and modify the schedulable of two tasks that are assigned on the DM basis relative to one another. By repeating this process, the given schedule can be transformed into DM schedule.

When Di of every task Ti is equal to dPi for some constant 0<d where d is density, then the DM and RM algorithms are same. In this case, the corollary of above theorem can be stated as “the RM algorithm is optimal among all fixed priority algorithms whenever the relative deadlines of the tasks are proportional to their periods.”

References

Liu, Jane W. S. Real Time Systems. Integre Technical Publishing Co., Inc, January 10, 2000. Print.

Lesson

Priority-Driven Scheduling of Periodic Tasks

Subject

Real Time System

Grade

IT

Recent Notes

No recent notes.

Related Notes

No related notes.