This section provides a review of prior work on adaptive uniprocessor real-time schemes in which tasks are reweighted based on external and internal stimuli.
1.3.1 Leave/join Reweighting
Underleave/join reweighting (Srinivasan and Anderson, 2005), a task’s weight is changed at job boundaries by forcing it to leave with its old weight and rejoin with its new weight.
Example (Figure 1.7). Consider the example Figure 1.7, which depicts a one-processor system with three tasks: T1:(1,2) that leaves at time 2;T2, which has an initial weight of 1/4, an execution cost of 1, and “initiates” a weight increase at time 2 to a weight of 3/4, which is enacted by leave/join reweighting atT21’s deadline (i.e., time 4); andT3:(2,8). (a)illustrates theEDFschedule and(b) illustrates the ideal and actual allocations to taskT2.
Notice that, even though T2 “initiates” its change at time 2 and capacity exists for T2 to increase its weight, this weight change cannot be “enacted” until its deadline. This illustrates that the primary drawback to leave/join reweighting is that a task canonlychange its weight at job boundaries. As a result, over the time range [2, 4),T2 behaves as though it is a task of weight 1/4, even though in the ideal system (which can instantly enact weight changes) T2 would behave as a task of weight 3/4, is depicted in Figure 1.7(b). As a result,T2’s allocation in the actual schedule “drifts” from its allocation in the ideal schedule by one time unit. (Briefly,drift is the difference between a task’s ideal and actual allocations caused by a single reweighting event.) Moreover, since leave/join reweighting cannot enact a reweighting event until a job boundary, it is possible that a task can incur an arbitrarily large amount of drift for one reweighting event. Section 1.5.3 provides a more detailed discussion concerning drift.
1.3.2 Rate-Based Earliest Deadline
Under rate-based earliest-deadline (RBED) scheduling (Brandt et al., 2003), which was pro- posed for uniprocessor systems, tasks are scheduled on an EDF basis and can change their
1 3 T 2 T T Job Deadline (b) Time (a) Allocations 5 4 3 1 0 3
Scheduled Job Release
2 8 6 4 2 0 Time 8 7 6 5 0 1 2 4 1 Unit of Drift Ideal Actual
Figure 1.7: The (a) EDF schedule and the (b) ideal and actual allocations to T2 in a one- processor example of leave/join reweighting.
weights and periods via two different rules based on whether the execution time or period is changed. While these rules are more responsive than leave/join reweighting, it is still possible for a task to incur an arbitrarily large amount of drift underRBED. In Chapter 2, we will review this work in detail.
1.3.3 Proportional Share Scheduling
Underproportional share scheduling (Stoica et al., 1996), the guaranteed weight of each task is determined as a function of its desired weight and the desired weight of all other tasks. Specifically, the guaranteed weight of the taskTi at time tis defined as
Gwt(Ti, t) =
wt(Ti)
WT(τ,t), (1.2)
where WT(τ,t) is the total desired weight of all active tasks in the system τ at time t. For example, consider a one-processor system that consists of four tasks: T1 that has a desired weight of 1/2; T2 that has a desired weight of 1/4;T3 that has a desired weight of 1/4; and T4 that has a desired weight of 1/8. If, at some time t1 all four tasks are active, then the guaranteed weight for each task would be 1/(1/2 + 1/4 + 1/4 + 1/8) = 8/9 of its desired weight. So, the desired weight of T1 would be 4/9. Alternatively, if at some time, t2, only T1 andT2 were active, then the guaranteed weight of each would be 4/3 of its desired weight for each task. So, the guaranteed weight of T1 would be 2/3. It is worthwhile to note that proportional share algorithms cannot change the weight of only one task in a system
without using leave/join techniques. In Section 2.3, we will review one of the more popular proportional share scheduling algorithms.
1.3.4 Adaptive Feedback-Based Frameworks
In adaptive feedback-based scheduling algorithms, the execution time of each job is unknown until it is complete. As a result, in these systems, each task’s weight is defined as a function of its estimated execution time, which is calculated for a job by using the actual execution times of the task’s prior jobs. Moreover, a user can fine-tune a feedback-based system to achieve desired behaviors.
Lu et al. (Lu et al., 2000) were the first to propose such a scheduling algorithm, which was directed at uniprocessor systems.2 Under their algorithm, called FC-EDF2, each task has multiple versions (called service levels), each of which has a different level of QoS and a different nominal processor share, representing the fraction of a processor the task will require on average if it executes at that service level. A task can only execute at one service level at a time. In order to control the system, FC-EDF2 monitors the system’s utilization
and miss-ratio, i.e., the fraction of jobs with missed deadlines. In order to minimize the miss-ratio while maximizing utilization,FC-EDF2 adjusts the set of scheduled tasks and their service levels. More recently, Lu et al. extended this work to create a comprehensive feedback scheduling framework (Lu et al., 2002) that more explicitly incorporates the value to the system associated with each service level. This framework is the basis for the approach we propose in this paper. One drawback ofFC-EDF2 is that, because only the utilization and the
system-wide miss-ratio are monitored, the system cannot identify whether an individual task has an actual execution time that deviates substantially from its estimated execution time. Thus, the system can only respond to differences between the actual and estimated execution times of tasks by changing the entire system instead of only a few tasks.
Alternatively, Abeni et al. have proposed a uniprocessor feedback algorithm in which each task has its own feedback-controller rather than one controller for the entire system (Abeni
2Specifically, the firstcorrect feedback algorithm was proposed in (Lu et al., 2000). The original system,
FC-EDF, proposed in (Lu et al., 1999) could not satisfy its design specification because it was possible for the
controller to become saturated, thus rendering it unable to correctly adjust the system.
et al., 2002). In order to attempt to maintain an accurate processor share for each task, their algorithm monitors,for each task, the difference between the estimated and actual execution times of each job. Once the system has calculated a new estimated execution time for a future job, it adjusts the task’s weight. More recently, Cucinotta et al. extended this approach to provide stochastic guarantees concerning per-task processor shares (Cucinotta et al., 2004). One drawback of their approach is that it ignores the possibility that some tasks are more important than others.
In addition to general-purpose real-time scheduling algorithms, feedback-based scheduling has become increasingly important for managingcontrol tasks, i.e., tasks that control external devices. In work by Mart´ı et al. (Marti et al., 2004), an approach is proposed that is similar to that of Abeni et al., except that in (Marti et al., 2004), each period of each task has an associated “importance value” that denotes the task’s value to the system in that period. By using importance values, Mart´ı et al. determined the optimal period for each task via standard linear programming techniques. One limitation of this approach is that it cannot adjust the amount of time for which a task executes, like other approaches (e.g., like that of Lu et al. (Lu et al., 2002)).