**Quality of Service Scheduling in the Firm Real-Time Systems**

Audrey Queudet-Marchand and Maryline Chetto *University of Nantes, IRCCyN UMR CNRS 6597 France*

#### **1. Introduction**

190 Real-Time Systems, Architecture, Scheduling, and Application

Y. Y. Wang, Q. Wang, H. A. Wang. Dynamic adjustment of execution order in real-time

Symposium, 2004. 1219~1225.

database. In Proceedings of 18th International Parallel and Distributed Processing

#### **1.1 What does firm real-time mean?**

Real-time systems are those in which the time at which the results are produced is important. The correctness of the result of a task is not only related to its logical correctness, but also to when the results occur (Stankovic, 1988). In order to characterize their requirements, real-time systems are traditionaly classified as follows: *hard, soft* and *firm* (Liu, 2000). It is imperative that all time constraints are met in hard real-time systems. In contrast, firm or soft real-time systems do not have as stringent timeliness requirements allowing for some degree of tardiness (soft) or miss ratio (firm). Many researches within the soft and firm real-time area have focused on minimizing tardiness and/or miss ratio but without quantifying acceptable levels. In this chapter, we focus on scheduling firm periodic tasks which have additional requirements. These requirements specify the minimum acceptable completion ratios that should be met in order to maintain system correctness. In a hard real-time system all hard deadline tasks must meet their deadlines to maintain system correctness; otherwise, the system has failed. In contrast, a deadline is considered to be soft if it can be missed occasionally. A task that misses a single soft deadline is not considered a failure. Correctness in a soft real-time system is determined by the degree to which timeliness has been enforced for the entire task set. However, the completion of a tardy firm deadline task is not meaningful since late delivery of the result is considered to be of no value to the real-time system.

Although firm deadlines can occasionally be missed, there is normally an upper limit to the number of misses within a defined interval. The hard real-time paradigm is well established and it has received considerable attention by researchers and practitioners within the academe and the industry alike. Numerous techniques and algorithms – especially in the area of scheduling – have been developed. Most scheduling algorithms developed for soft and firm real-time systems lack the ability to enforce constraints on the upper limit of misses. Unbounded consecutive time constraint violations may occur without such an enforcement. Realistically, if consecutive instances of a task fail to complete before their deadlines, then the system will eventually suffer from a failure. This indicates that there are additional constraints. These constraints express the minimum degree of timeliness that must be enforced for firm real-time tasks. This is the subject of this chapter.

in the Firm Real-Time Systems 3

Quality of Service Scheduling in the Firm Real-Time Systems 193

even energy starvation cannot be accurately characterized at design time. The occurrence of such situations will temporarily make the system overloaded (i.e. the processing power required to handle all the tasks will exceed the system capacity). The scheduling will then consist in determining the sequence of execution of sampling tasks in order to provide the

The scheduling will play a significant role because of its ability to guarantee an acceptable sampling rate for all the tasks. The scheduler aims to gracefully degrade the QoS (i.e. sampling rate) to a lower but still acceptable level – e.g. a recording at 15 values per minute instead of 30 values per minute for wind speed – in such an overload situation. The execution of some (least important) tasks will be skipped. For instance, it will be less harmful to an air quality surveillance system to skip one wind speed record than to interrupt the transmission of the carbon dioxide level. Given this observation, one gets a better understanding of the

In this chapter, we address the problem of the dynamic scheduling of periodic tasks with firm constraints. The scope of this study concerns maximizing the actual QoS of periodic tasks *i.e.*

Different approaches have been proposed in order to specify firm real-time systems. In (Hamdaoui & Ramanathan, 1995), the concept of *(m,k)-firm* deadlines permits us to model tasks that have to meet *m* deadlines every *k* consecutive instances. The *Distance-Based Priority (DBP)* scheme increases the priority of a job in danger of missing more than *m* deadlines over a sliding window of *k* instances for service. In order to specify a task that tolerates *x* deadlines missed over a finite range or window among *y* consecutive instances, a *windowed lost rate* is also proposed in (West & Poellabauer, 2000). In (Bernat et al., 2001), the authors describe a more general specification of the distribution of met and lost deadlines. *Virtual Deadline Scheduling (VDS)* (West et al., 2004) and *Dynamic Window-Constrained Scheduling (DWCS)* (Zhang et al., 2004) are other existing schedulers provably superior to *DBP* for a number of

The notion of *skip factor* is presented in (Koren & Shasha, 1995). The skip factor of a task equal to *s* means that the task will have one instance skipped out of *s*. It is a specific case of the *(m,k)-firm* model with *m* = *k* − 1. Skipping some task instances then permits us to transform an overload situation into an underload one. Making optimal use of skips has been proved to be an NP-hard problem. (*m*,*k*)-hard schedulers are presented in (Bernat & Burns, 1997). Most

Scheduling hybrid task sets composed of skippable periodic and soft aperiodic tasks has been studied in (Buttazzo & Caccamo, 1999; Caccamo & Buttazzo, 1997). A scheduling algorithm based on a variant of *Earliest Deadline First (EDF)* exploits skips under the *Total Bandwith Server (TBS)*. In our previous work (Marchand & Silly-Chetto, 2005; 2006), we make use of the same approach with the *Earliest Deadline as Late as possible server (EDL)*. These results led us to propose a raw version of the *Red tasks as Late as Possible (RLP)* algorithm (idle time schedule

of these approaches require off-line feasibility tests to ensure a predictable service.

based on red tasks only) (Marchand, 2006; Marchand & Chetto, 2008).

real-time CPU scheduling flexibility needed in such applications.

the ratio of instances which complete before deadline.

**2. Scheduling skippable periodic tasks**

specific and non-trivial situations.

best QoS.

**2.1 Related work**
