LOS ELEMENTOS
1.5. METODOLOGÍA DE LOS ELEMENTOS DE DEPURACIÓN
In this section, we briefly describe the contributions of this dissertation.
1.10.1
Generalized Tardiness Bounds
The first contribution we discuss is a generalized job prioritization rule originally proposed in (Leontyev and Anderson, 2008a, 2010) and tardiness bounds under it.
We found that the singular characteristic needed for tardiness to be bounded under a global scheduling algorithm is that a pending job’s priority eventually (in bounded time) is higher than that of any future job. Global algorithms that donot have this characteristic (and for which tardiness can be unbounded) include static-priority algorithms such as the rate-monotonic (Rate-Monotonic (RM)) algorithm, and impractical dynamic-priority algorithms such as the earliest-deadline-last(Earliest Deadline Last (EDL)) algorithm, wherein jobs with earlier deadlines havelower priority. Global algorithms thatdo have this property include the EDF, FIFO, EDF-until-zero-laxity (Earliest Deadline Zero Laxity (EDZL)), and least-laxity-first (Least Laxity First (LLF)) algorithms. (EDZL is described later in Section 2.1.2 and LLF is described in Section 3.2.)
We establish a generalized tardiness result by considering a generic scheduling algorithm where job priorities are defined by points in time that may vary as time progresses. All of the algorithms mentioned above can be seen as special cases of this generic algorithm in which priorities are further constrained. Even the PD2 Pfair algorithm (Anderson and Srinivasan, 2004), which uses a rather complex notion of priority, is a special case. In this dissertation, we present a derivation of a tardiness bound that applies to the generic algorithm if priorities arewindow-constrained: a job’s priority at any time must correspond to a point in time lying within a certain time window. We also show that if this window constraint is violated, then tardiness can be unbounded. It is possible to define window-constrained prioritizations for EDF, FIFO, EDZL, LLF, and PD2, as well as the earliest-pseudo-deadline-first (Earliest Pseudo-
Deadline First (EPDF)) Pfair algorithm, so these algorithms have bounded tardiness. (For EDF, EPDF, and PD2, this was previously known.) For any other algorithm that may be devised in the future, our results enable tardiness bounds to be established by simply showing that prioritizations can be expressed in a window-constrained way (instead of laboriously devising a new proof).
The notion of a window-constrained priority is very general. For example, it is possible to describe hybrid scheduling policies by combining different prioritizations,e.g., using a combination of EDF and FIFO in the same system. Priority rules can even change dynamically (subject to the window con- straint). For example, if a task has missed too many deadlines, then its job priorities can be boosted for some time so that it receives special treatment. Or, if a single job is in danger of being tardy, then its prioritization may be changed so that it completes execution non-preemptively (provided certain re- strictions hold — see Section 3.4.5). Tardiness also remains bounded if early-release behavior is allowed or if the capacity of each processor that is available to the (soft) real-time workload is restricted. In simplest terms, the main message is that,for global scheduling algorithms, bounded tardiness is the com- mon case, rather than the exception(at least, ignoring clearly impractical algorithms such as EDL). For the widely-studied EDZL and LLF algorithms, and for several of the variants of existing algorithms just discussed, this dissertation is the first to show that tardiness is bounded. The proposed formulation of job priorities has been used by other researchers for the design and implementation of cache-aware mul- tiprocessor real-time schedulers (Calandrino, 2009) and for devising new interrupt accounting techniques on multiprocessors (Brandenburg et al., 2009).
1.10.2
Processor Bandwidth Reservation Scheme
The second major contribution of this dissertation is a new multiprocessor scheduling approach for multi-level hierarchical containers that encapsulate sporadic SRT and HRT tasks. In this scheme, each container is allocated a specifiedbandwidth, which it uses to schedule its children (some of which may also be containers).
The bandwidth w(H) is allocated to containerH by means of reserving ⌊w(H)⌋ processors for its children plus (if the bandwidth is not integral) the time occasionally available on an additional processor such that the total processor time supplied toHover a sufficiently long period of time ∆ is approximately w(H)·∆. The supply to theH’s children is thus represented as a number of fully available processors plus at most one processor that is partially available. Given this allocation scheme, H’s child tasks and containers are accommodated as follows. First, the set of child HRT tasksHRT(H) is encapsulated in a container Chrt with an integral bandwidth w(Chrt) so thatHRT(H) is schedulable using PEDF.
job release job deadline C1 C3 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 t P1 P2 P3 S3,1 S1,1 S3,2 S1,2 S3,3 S1,3 S3,4
Figure 1.8: Illustration to container allocation in Example 1.6.
Second, each child containerCj is given⌊w(Cj)⌋dedicated processors from the set of⌊w(H)⌋processors dedicated toH. Third, for each child containerCjwith a non-integral bandwidth, aserver taskSj(ej, pj) is created such thatuj = w(Cj)− ⌊w(Cj)⌋. When task Sj is scheduled, tasks fromCj are scheduled. The set of SRT tasks and server tasks is scheduled together on processors that are not reserved for HRT tasks and child containers using an algorithm that ensures bounded tardiness for each task. Each child containerCj thus receives processing time approximately proportional to its requested bandwidth. Applying this strategy recursively, we can accommodate an entire container hierarchy.
Example 1.6. Consider the multimedia application introduced in Section 1.8. We define the bandwidth of container C1 and C3 to be w(C1) =w(C3) = 1.4. Since the bandwidth is non-integral, for each of the containers C1 andC3 we dedicate ⌊w(C1)⌋=⌊w(C3)⌋= 1 processor and construct periodic server tasks S1(4,10) and S3(4,10) with utilizations u1 = u3 = 0.4. Figure 1.8 shows an example schedule in which processors 1 and 3 are dedicated to containersC1 andC3 and the server tasks are scheduled using EDF on processor 2. Each container thus receives the capacity of approximately 1.4 processors over sufficiently long time intervals.
Our scheme is novel in that, in a system with only SRT tasks, no utilization loss is incurred (assuming that system overheads are negligible—such overheads will cause some loss in any scheme in practice). This statement is true, provided the goal is to schedule SRT tasks so that their tardiness is bounded, no matter how great the bound may be. The scheduling scheme we present also allows HRT tasks to be supported. However, such support may incur some utilization loss. These tradeoffs are discussed in detail in Section 4.5.
In addition to presenting our overall scheme, we also present the results of experiments conducted to assess its usefulness. In these experiments, our scheme exhibited performance—in terms of both necessary processing capacity and tardiness—comparable to that of schemes that exhibit good performance but are oblivious to containers (and hence, do not provide any container isolation).
1.10.3
Multiprocessor Extensions to Real-Time Calculus
The third major contribution is a framework for the analysis of multiprocessor processing elements with streaming tasks where the constituent processors are managed according to a global multiproces- sor scheduling algorithm. Such processing elements can be used for building complex applications that cannot be analyzed using state-of-the-art multiprocessor scheduling techniques and that must be over- provisioned, wasting processing resources, if analyzed using conventional real-time calculus. Sporadic and streaming task sets under GEDF, and static-priority schedulers, can be analyzed in this framework. Our work is different from prior efforts that assume implicit deadlines, full processor availability, and non-zero tardiness for each task (Devi, 2006; Devi and Anderson, 2005, 2006). In one recent paper, Bini et al. (2009a) presented a HRT schedulability test for GEDF for systems where processors can be partially available. However their work also assumes that tasks are sporadic and have constrained deadlines. In contrast, the task model and the scheduler assumed in our proposed framework are very general.
The core of our framework is a procedure for checking that arbitrary pre-defined job response times
{Θ1, . . . ,Θn}are not violated under a restricted global scheduling algorithm on a platform with a min- imum cumulative capacityB(∆). Note that, if relative deadlines and tardiness thresholds are specified for tasks, then checking pre-defined job response times is equivalent to checking whether a job completes within its relative deadline plus its tardiness threshold.
In settings where response-time bounds{Θ1, . . . ,Θn}are not known, they must be determined. In ad- dition to giving a test that checks pre-defined response-time bounds, we propose closed-form expressions for calculating response-time bounds directly from task and supply parameters for a family GEDF-like schedulers such as GEDF and FIFO. The obtained expressions for response-time bounds are similar to those for calculating tardiness bounds under GEDF proposed by Devi and Anderson (2008b). It is also possible to refine the obtained response-time bounds by incrementally decreasing them and running the aforementioned test procedure to see if the smaller bounds are also valid.
Once maximum job response-time bounds{Θ1, . . . ,Θn}are determined, we use them to characterize the sequences of job completion events for each taskTi in terms of arrival functionsαui
′(∆) andαl i
′
(∆), and the remaining cumulative processor supplyB′(∆) (see Figure 1.9). The calculated stream and supply
outputs can serve as inputs to subsequent processing elements, thereby resulting in a compositional technique.
a
1a’
1a’’
1B
B’
a
na’
n Response-time calculation Q1 Qn {Q1,...,Qn}Supply output calculation
Stream output calculation
Figure 1.9: A multiprocessor element analyzed using multiprocessor real-time calculus.