**4. Two case studies**

18 Will-be-set-by-IN-TECH

Natarajan, 1995; Shih et al., 1991) and specific techniques have been developed for designing

In a real-time system that supports imprecise computation, every task *τ<sup>i</sup>* is decomposed into a *mandatory* subtask *Mi* and an *optional* subtask *Oi*. The mandatory subtask is the portion of the computation that must be done in order to produce a result of acceptable quality, whereas the optional subtask refines this result (Shih et al., 1989). Both subtasks have the same activation time *ri* and the same deadline *di* as the original task *τi*; however, *Oi* becomes ready for execution when *Mi* is completed. If *Ci* is the worst-case computation time associated with the task, subtasks *Mi* and *Oi* have computation times *mi* and *oi*, such that *mi* + *oi* = *Ci*. In order to guarantee a minimum level of performance, *Mi* must be completed within its deadline, whereas *Oi* can be left incomplete, if necessary, at the expense of the quality of the

It is worth noting that the task model used in traditional real-time systems is a special case of the one adopted for imprecise computation. In fact, a hard task corresponds to a task with no optional part (*oi* = 0), whereas a soft task is equivalent to a task with no mandatory part

In systems that support imprecise computation, the *error �<sup>i</sup>* in the result produced by *τ<sup>i</sup>* (or simply the error of *τi*) is defined as the length of the portion of *Oi* discarded in the schedule. If *σ<sup>i</sup>* is the total processor time assigned to *Oi* by the scheduler, the error of task *τ<sup>i</sup>* is equal to

*�<sup>i</sup>* = *oi* − *σi*.

where *wi* is the relative importance of *τ<sup>i</sup>* in the task set. An error *�<sup>i</sup>* > 0 means that a portion of subtask *Oi* has been discarded in the schedule at the expense of the quality of the result produced by task *τi*, but for the benefit of other mandatory subtasks that can complete within

In this model, a schedule is said to be *feasible* if every mandatory subtask *Mi* is completed within its deadline. A schedule is said to be *precise* if the average error *�* on the task set is zero. In a precise schedule, all mandatory and optional subtasks are completed within their

For a set of periodic tasks, the problem of deciding the best level of quality compatible with a given load condition can be solved by associating each optional part of a task a reward function *Ri*(*σi*), which indicates the reward accrued by the task when it receives *σ<sup>i</sup>* units of service beyond its mandatory portion. This problem has been addressed by Aydin et al. (Aydin et al., 2001), who presented an optimal algorithm that maximizes the weighted average

Note that in the absence of a reward function, the problem can easily be solved by using a compression algorithm like the elastic approach. In fact, once, the new task utilizations *U*�

> *C*� *<sup>i</sup>* = *TiU*� *i* .

*<sup>i</sup>* that lead to a given desired load can easily be

*i*

*wi�i*,

*�* = *n* ∑ *i*=1

programs that can produce partial results.

The *average error �* on the task set is defined as

result produced by the task.

(*mi* = 0).

their deadlines.

of the rewards over the task set.

computed from the periods as

are computed, the new computation times *C*�

deadlines.

This section describes two real-world applications to illustrate how the presented techniques can be used to prevent the negative effects of the overload. The first example considers a multimedia system and shows how resource reservation can isolate the timing behavior of concurrent applications characterized by highly variable execution times, preventing a performance degradation due to a reciprocal interference. The second example illustrates how to handle a permanent overload in a robot system that activates a new task to cope with obstacle avoidance.
