The main part of a real-time system consists of tasks, i.e. of computer processes. A task is a computation that is executed by the processor in a sequential fashion: it is a sequential execution of code that does not suspend itself during execution. The characterization of a task i can vary from one scheduling model to another. Among the many parameters that can be found in literature on recurrent tasks (require repeated execution), consider the following (cf. Figure 2.2):
• The ready time or release time rirepresents the date after which task i can proceed its execution
for the first time, it is also called activation date. In the case of periodic tasks, with period Ti, an
instance k ∈ IN of a task i is released at rk
i = rk−1i + Ti, with r0i = ri.
• The deadline di represents the duration before which the task should terminate its execution.
Exceeding this limit can cause a temporal violation. Two kinds of deadlines can be differentiated:
– Hard: meeting a task deadline is critical for the system functionality. Missing a hard dead-
line is considered a definite failure, and leads to catastrophic consequences.
– Soft: it is desirable to meet a task deadline, but occasionally missing it can be tolerated. A
task with a soft deadline is expected to be completed either before the deadline or as early as possible after it.
• The start time ti and end time ei are respectively the date at which task i executes for the first
time on the associated processor and the date at which it finishes its execution (for the first time). If the task requires execution with a period Ti, then tki and eki represent the start and end times for
instance k of task i.
• The execution time bi represents the duration of execution for task i. This parameter is con-
sidered in the majority of works on hard real-time scheduling as the worst-case execution time (WCET) [28] on the processor on which it is going to execute. The WCET represents an upper bound for the execution time of a task. In other words, although a task can finish earlier, the WCET represents an estimation on the maximum possible duration this task needs to execute. In order for this parameter to be valid, its value should not be overestimated. And after this estimation, the task’s execution time must never exceed the estimated value.
• The laxity li corresponds to the maximum duration a task i can delay its execution without sur-
passing its deadline. As a function of time, li(t) represents the same indicated duration while
considering only the remaining execution bi(t) at time t, that is li(t) = di− t − bi(t).
If release times are included for a task system (first activation dates for tasks are known a priori), such a system is called a concrete task system. Otherwise, the task system is a non-concrete one. Note that given an incomplete task system (release times are not specified), an infinite number of complete task systems can be obtained by simply specifying the release time for each task. In the special case for which the release times for all tasks are equal zero, the complete task system is called a synchronous task system.
For what concerns task periodicities, a task can either execute periodically at regular intervals, or randomly with no specified period (non-periodic tasks).
2.2. GENERALITIES ON REAL-TIME SCHEDULING 47
Figure 2.2: Graphical representation of a real-time model.
(a) Classic periodicity. (b) Strict periodicity.
Figure 2.3: Periodicity types in a real-time system.
2.2.1.1 Periodic tasks
A task i is referred to as periodic of period Ti if the activation of this task is produced at regular time
intervals Ti. The service provided by this periodic task is hence made indefinitely. For this reason, each
of these executions is called an instance of task i. Figures 2.3a and 2.3b represent two types of periodic task periods:
• Classic period: It is the most used in real-time applications. Each instance k of task i is allowed to execute after its respective activation date rk
i. Although no constraints are imposed on the
distance between the start times of two successive instances k and k + 1, these instances should respect deadline constraints such as the hard deadline one (ek
i ≤ rik+ di).
• Strict period: As compared to the classic period, execution start dates tk
i for the instances of a
periodic task i must be exactly Tiapart. Consequently, given task i offset (first execution date) ti,
instance k start date should satisfy: tk
i = ti+ k Ti. In this case, it suffices to verify the deadline
constraint for only the first instance of a task’s execution. It can be also easily seen that the strict period forms a special case of the classic one.
Task periodicities can be also classified as harmonic or non-harmonic. Harmonic periods imply that every period divides every other one of greater value (Ti|Tj or Tj|Tifor all i, j), e.g. the set {2, 6, 12}.
Non-harmonic periods are however not constrained, periods may be primary, multiples or of no relation between each other, e.g. the set {2, 6, 8}.
Due to the strict periodicity aspect discussed in Section 1.2.3.2, tasks considered in this thesis are characterized by a strict period and not a classic one. In addition, no hypothesises on the harmonic and non-harmonic classifications of periods are considered.
48 2. STATE OF THE ART
2.2.1.2 Non-periodic tasks
A task is specified as non-periodic if its successive activations arrive at an irregular basis, that is to say that the task does not abide by a predefined period. There exists two types of non-periodic tasks:
• Aperiodic: activation dates are random and cannot be anticipated. Task execution is the product of internal or external events that can trigger at any instant. In [143], different procedures for scheduling the execution of aperiodic tasks in real-time systems are exposed.
• Sporadic: a special case of aperiodic tasks where a lower bound on the time duration that sepa- rates two successive activations is known. These type of tasks are frequently specified as periodic tasks [104], where the aforementioned lower bound is considered as the task period, in order to apply existing results on periodic tasks.
These two types of non-periodic tasks are not considered in this thesis.