• No se han encontrado resultados

Otros factores distintos que podrían ser una causa del daño grave 50

One of the most important works on uniprocessor scheduling was that of Liu and Layland [110] in 1973, after which several solid results have been established. The literature in this domain is enriched and consists of optimal scheduling algorithms as well as performance analysis of schedules. The following sections discuss some well-known uniprocessor scheduling algorithms.

2.5.1.1 Rate Monotonic (RM)

Introduced by Liu and Layland in 1973 [110], the rate monotonic algorithm represents one of the most popular static priority rules. The rate monotonic scheduling is a preemptive scheduling with static priority that is applied to independent periodic task sets. It was defined for a sub-class of periodic task sets:

• Periodic tasks in a synchronous system, that is, all tasks are started at the same time (r1 = r2 =

. . . = rn), and

56 2. STATE OF THE ART

The priorities are allocated to the different tasks in the following manner: the shorter the task pe- riod, the more priority it is allocated. The principal contribution of this algorithm is that it is optimal for the model proposed by Liu and Layland [110] (the tasks are preemptive, periodic and independent) from a scheduling point of view (if a feasible solution exists then the algorithm can find it).

The sufficient condition for schedulibility using the RM algorithm when applied to a system of n tasks is [110]: n + i=1 bi Ti ≤ n (21n − 1),

where the left-hand side of the inequality represents the processor utilisation, and the right-hand side represents the utilisation bound.

Later on, a necessary and sufficient condition was introduced in [85]. The authors show that if a set of periodic tasks (classic periods), sorted by decreasing priority, can be scheduled by RM and the response time Ri = (ei− ti) of task i is upper bounded by the solution of:

Ri=   i−1 + j=1 6 Ri Tj 7 bj  + bi,

where +x, is the superior integer part of x, then the scheduling of this task set is feasible if and only if: Ri ≤ Ti, ∀i = 1 . . . n.

In the non-preemptive context, RM becomes non-optimal.

2.5.1.2 Deadline Monotonic (DM)

The deadline monotonic scheduler is an extension of the rate monotonic scheduler, and hence follows a static priority rule. It was introduced by Leung and Whitehead in 1982 [105] where the algorithm relaxes late deadline condition into the general deadline; namely it allows the deadline of a task to be less than the period (di ≤ T i). Hence, the deadline monotonic rule is defined for a larger sub-class of

periodic task sets.

The smaller the deadline di, the more task i has priority. DM is optimal for Liu’s and Layland’s

model [110] from a scheduling point of view.

The sufficient condition for scheduling n periodic tasks (sorted by decreasing priority) {1, . . . , i, . . . , n} using DM is: bi+ i−1 + j=1 6 di Tj 7 bj ≤ di, ∀i = 1 . . . n.

As is the case for RM, there exists a necessary and sufficient condition for the DM algorithm. If a set of periodic tasks, sorted by decreasing priority, is scheduled by DM such that the response time Ri

2.5. REAL-TIME SCHEDULING ALGORITHMS 57

of task i is upper bounded by the solution of the equation: Ri=   i−1 + j=1 6 Ri Ti 7 bj  + bi,

then the scheduling of this set is feasible if and only if: Ri ≤ di, ∀i = 1 . . . n.

DM becomes non-optimal in the non-preemptive case, except for the following case: bi ≤ bj, di ≤

dj, ∀(i, j).

2.5.1.3 Earliest Deadline First (EDF)

This popular algorithm was also introduced by Liu and Layland in 1973 [110]. It is a scheduling that can be preemptive or non-preemptive with dynamic priority, applied to periodic independent tasks with di = Ti. The idea for allocating priorities in this algorithm is that the task whose absolute deadline

is the earliest to arrive has the highest priority. The priorities are re-evaluated, if necessary, over time. This re-evaluation is effected when, for example, a new task arrives and its deadline is the nearest as compared to other ready tasks. EDF is optimal for preemptive uniprocessor scheduling with dynamic priority for independent periodic tasks whose deadlines are equivalent to their periods. It was later shown that this algorithm remains optimal if the tasks are non-periodic.

The necessary and sufficient condition for schedulability in the preemptive case (if di = Ti, ∀i) is: n + i=0 bi Ti ≤ 1. 2.5.1.4 Least-Laxity First (LLF)

This algorithm is based on the laxity of tasks. LLF was first introduced by Mok and Dertouzos [119, 118]. At each invocation, LLF elects the task whose laxity is the smallest. [41] shows that the conditions for schedulability for the LLF algorithm are the same as those for EDF, this means that the necessary and sufficient condition in the preemptive case (with di= Ti, ∀i) is:

n + i=0 bi Ti ≤ 1.

The LLF algorithm becomes inconvenient when several tasks have the same laxity, in which case a large number of changes is generated. This explains why it is rarely used in the uniprocessor case.