• No results found

1.6 Organization

2.1.2 Hard vs Soft Real-Time Systems

Broadly, real-time systems can be divided into two categories: hard and soft. In hard real- time systems, missing a deadline is catastrophic; in such systems,all deadlines must be met. Examples of hard real-time systems exist in safety-critical domains including transportation, aviation, and defense. In soft real-time systems, deadline misses can be tolerated in some cases. Further, in hard real-time systems, worst-case execution costs must be carefully deter- mined, whereas in soft real-time systems, such costs can be determined less precisely (e.g., by executing a large number of jobs of a task and using the maximum observed execution time as the worst-case execution cost). Examples of soft real-time systems include multimedia applications for which buffering may be employed or an occasional missed frame is permis- sible, certain types of real-time transactions (e.g., those that react to changes in the stock market), and applications for which guaranteeing ashareof the system over time is of greater

importance than meeting explicit deadlines.

While the primary objective of a real-time scheduling algorithm is to ensure timing con- straints, recent results by Leontyev and Anderson [44] and Devi and Anderson [30] imply that soft real-time constraints provide sufficient flexibility to consider secondary objectives. In this dissertation, reducing miss rates in shared caches that are present in multicore platforms is the secondary objective. As explained in Chapter 1, such caches are a key bottleneck that must be addressed within scheduling approaches to achieve good overall system performance. Several different notions of soft real-time guarantees exist. We now provide an overview of three different types of soft real-time guarantees.

Percentage of deadlines met. This type of soft real-time guarantee concerns the per- centage of deadlines met by each task in a given sampling window, and is a function of the

miss ratio, which is the number of deadline misses divided by the number of jobs in that same sampling window. This type of guarantee was considered by Lu et al. [47] and by Jain et al.[40]. In [47], feedback control mechanisms are employed to achieve a desired miss ratio for each task or an entire task system, whereas in [40], scheduling in the presence of hardware multithreading is considered, where a task set is considered “schedulable” if at most 5% of the deadlines of any task are missed.

(m, k)-firm guarantees. Alternatively, rather than being concerned with a percentage, we can make a guarantee related to the number of jobsm that must meet their deadlines within any window of kconsecutive jobs. This type of guarantee was first introduced by Hamadoui and Ramanathan [36] as an (m, k)-firm guarantee. Such a guarantee tends to be stronger than a simple percentage-based guarantee, since the guarantee must hold forany window ofkjobs rather than just the sampling window, but exceptions do exist. The differences between these two types of guarantees are better shown in Figure 2.3. In insets (a) and (b), the percentage- based guarantee of 50% is met; however, a (1,2)-firm guarantee is not met in inset (b). In fact, even a seemingly weaker (1,3)-firm guarantee is not met. Interestingly, inset (c) presents a case where the (1,2)-firm guarantee is met without meeting the 50% guarantee; however, this is due to the size and position of the sampling window. If the (1,2)-firm guarantee continued

00 00 00 00 00 11 11 11 11 11 00 00 00 00 00 11 11 11 11 11 00 00 00 00 00 11 11 11 11 11 00 00 00 00 00 11 11 11 11 11 00 00 00 00 00 11 11 11 11 11 00 00 00 00 00 11 11 11 11 11 00 00 00 00 00 11 11 11 11 11 00 00 00 00 00 11 11 11 11 11 00 00 00 00 00 11 11 11 11 11 00 00 00 00 00 11 11 11 11 11

(a)

(b)

(c)

(1,2)−firm guarantee met

50% guarantee met 50% guarantee met

(1,2)−firm guarantee not met (1,2)−firm guarantee met 50% guarantee not met

Figure 2.3: Comparison of percentage-based and (m, k)-firm soft real-time guarantees for seven consecutive jobs of the same task, where each job is indicated by a box. A hatched box indicates a deadline miss for the corresponding job.

to be met, then increasing the size of the sampling window by one job, or shifting it left or right by one job, would result in the 50% guarantee being met as well.

Bounded tardiness. The final notion of soft real-time computing considered in this dis- sertation is bounded tardiness. With this notion, soft real-time guarantees are met if the amount by which deadlines are missed, known astardiness, is bounded. For some scheduling algorithms, tardiness may be bounded by some amountB, meaning that for a taskT, any job

Ti must complete execution no later than time d(Ti) +B, where B is a tardiness bound. As an example, in the schedule shown in Figure 2.2, hard real-time constraints cannot be met, since deadlines are missed. Since tardiness is at most one time unit, and therefore bounded, wecan meet soft real-time constraints if this bound is suitable. Often, this bound is different for different tasks; if a bound on the entire system is desired, then a maximum value over all tasks can be computed. The first major research effort to determine such bounds for a real-time scheduling algorithm was by Srinivasan and Anderson [62]. This effort was later improved upon by Devi and Anderson [29], whose work paved the way for additional studies that provide tardiness bounds for broad classes of scheduling approaches [30, 44]. Further dis- cussion of this work is best preceded by an overview of multiprocessor and global scheduling, which are provided in Sections 2.1.4 and 2.1.5.

Comparison. In this dissertation, bounded tardiness is the notion of soft real-time com- puting that we consider, since it has a number of advantages over the other notions of soft real-time guarantees. First, the work on bounded tardiness cited earlier allows us to con- clude that a wide variety of scheduling approaches automatically provide bounded tardiness.

As a result, significant scheduling flexibility exists to influence co-scheduling decisions in an attempt to reduce cache miss rates. Second, bounded tardiness may be more compatible than other notions of soft real-time constraints for applications that can employ buffering, for example, multimedia applications. (An explanation of exactly how buffering can be employed to “hide” tardiness in such applications will be provided in Chapter 4.) Finally, when seeking to guarantee a share of the system to a task over time, rather than meet every deadline, a bound on tardiness is more natural than percentage-based or (m, k)-firm guarantees—as long as tardiness is bounded so that the desired share is maintained over time, the proportion of deadlines missed is unimportant. For these reasons, in the chapters that follow, bounded tardiness is the only notion of soft real-time guarantee that we consider. Henceforth, when dis- cussing soft real-time constraints or guarantees, we mean bounded tardiness unless otherwise noted.

It is worth nothing that, since we implement our cache-aware scheduler within Linux, a number of sources of non-determinism exist (related to running a real operating system on real hardware) that are beyond our control. In such an environment, we interpret “soft real-time” to mean that deadline tardiness on average remains bounded, even if some tasks occasionally misbehave due to effects beyond our control. There are now many advocates of using Linux to support this notion of soft real-time execution. We will revisit this issue when presenting scheduling overheads in Chapter 6.