Anadaptable sporadic task systemis an extension of a sporadic task system, where the weight of each taskTi is a function of timet, denotedwt(Ti,t), and its execution time can vary with
each job Tij, denoted e(Tij). (The behavior of an adaptable sporadic task is defined by an execution time and weight instead of an execution time and period pair—the two approaches are equivalent but the former results in less complex reweighting rules.) For simplicity, if every job of a task Ti has the same execution time, then we will denote this time by e(Tij),
and if the weight of taskTi is constant, then we denote its weight as wt(Ti).
For adaptable sporadic tasks, theabsolute deadline of a jobTij, denoted d(Tij), is defined as
d(Tij) =r(Tij) +e(Tij)/wt(Ti,r(Tij)).
(Recall that r(Tij) is the release time ofTij.) In the absence of reweighting, consecutive job releases (r(Tij) and r(Tij+1)) of a task Ti must be separated by at least e(Tij)/ wt(Ti,r(Tij))
Notation Definition
wt(Ti,t) Weight ofTi at time t.
wt(Ti) Weight of theTi that does not change its weight.
Swt(Ti, t) Scheduling weight ofTi at timet.
e(Tij) Worst-case execution time of jobT j
i.
e(Ti) Worst-case execution time for all jobs ofTi.
emax(Ti) Maximal worst-case execution time of all jobs of Ti.
Ae(Tij) Actual execution time of jobT j i. r(Tij) Release time ofT j i. d(Tij) Deadline of T j i. θ(Tij) IS separation betweenT j−1 i andT j i.
SW Non-clairvoyant scheduling-weight scheduling algorithm. While a task is active, this algorithm allocates the task itsscheduling weight at each instant.
SW SW schedule of a task systemτ.
CSW Clairvoyant scheduling-weight scheduling algorithm. While a task is activeand the allocation to its active job is less than its actual execution time, this algorithm allocates the task itsscheduling weight at each instant.
CSW CSW schedule of task systemτ.
IDEAL Ideal scheduling algorithm. While a task is active, this algorithm allocates each task itsweight at each instant.
I IDEALschedule of task systemτ.
S Actual (i.e.,GEDFor NP-GEDF) schedule of task systemτ. A(B,Tij,t1,t2) Allocation toTij in the scheduleBover [t1,t2).
A(B,Ti,t1,t2) Allocation toTi in the scheduleB over [t1,t2). dev(Tij, t) Deviance of T j i: A(SW, T j i, 0,t)−A(S,T j i, 0,t). drift(Ti, t) Drift ofTi: A(I,Ti, 0,t)−A(CSW,Ti, 0,t).
Ow Scheduling weight before a reweighting event. Nw New weight after a reweighting event.
REM(Tij, t) Remaining execution time ofT j i at t. e(T j i)−A(S,T j i, 0,t). nextE(Tij, t) IfREM(T j i, t)>0, thennextE(T j i, t) =REM(T j i, t); else, nextE(T j i, t) =e(T j+1 i ).
Table 3.1: Summary of notation used in this chapter.
1
1 1
1
Job released Job deadline
Scheduled T 1 1 T 4 1 1 1 1 0 1 2 3 4 5 6 7 8 Time T T 2 3
Figure 3.1: A one-processor example of an adaptable sporadic task system. time units.
Example (Figure 3.1). Consider the example in Figure 3.1, which depicts a one-processor system with four tasks: T1, which joins the system at time 3 withwt(T1) = 2/5 ande(T1) = 2; T2 and T3, both of which have a weight of 1/6 and an execution time of 1; and T4, which has,
e(T41) = 2, e(T42) = 1, and an initial weight of 2/3 that decreases to 1/5 at time 3. Notice that since e(T41) = 2 and wt(T4,r(T41)) = 2/3, both d(T41) = 3 and r(T42) = 3. Also, since
e(T42) = 1 and wt(T4,r(T42)) = 1/5,d(T42) = 8.
A task Ti changes weight orreweights at timetifwt(Ti,t−ǫ)6=wt(Ti,t) whereǫ→0+.
For example, in the system depicted in Figure 3.1,T4 reweights at time 3.
We now explain some of the issues involved in processing such a reweighting event. If a taskTi changes weight at a timetc between the release and the deadline of some jobTij, then
the following two actionsmay occur:
• The execution time of Tij may be reduced to the amount of time for which Tij has executed prior totc, and the execution time ofTij+1may be redefined to be the amount
of time “lost” by reducing the execution time ofTij.
• r(Tij+1) maybe redefined to be less thanr(Tij)+e(Tij)/wt(Ti,r(Tij)). In this case, since d(Tij) =r(Tij) +e(Tij)/wt(Ti,r(Tij)), jobs T
j i and T
j+1
i will “overlap.” (For a standard
The reweighting rules we present in Section 3.4 state under what conditions the above actions occur and by how much beforer(Tij)+e(Tij)/wt(Ti,r(Tij)) the jobT
j+1
i can be released. When
the execution time of a job is reduced at a timet, then we say that it is “halted.” Specifically, if a jobTij ishalted at timet, thenAe(Tij) is set to A(S,Tij, 0,t).
Initiate and enact. As mentioned in Section 1.3.1, when a task reweights, there can be a difference between when it “initiates” the change and when the change is “enacted.” The time at which the change is initiated is a user-defined time; the time at which the change is enacted is dictated by a set of conditions described in Section 3.4. We use the scheduling weight of a task Ti at timet, denoted Swt(Ti, t), to represent the “last enacted weight ofTi.”
Formally, Swt(Ti, t) equals wt(Ti,u), where u is the last time at or before t that a weight
change was enacted for Ti (assuming an initial weight change occurred when Ti joined the
system). It is important to note thatfor adaptable sporadic tasks, we compute task deadlines and releases using scheduling weights. Hence, we have the following formulas:
r(Ti1) = θ(Ti1)
d(Tij) = r(Tij) +e(Tij)/Swt(Ti,r(Tij)) r(Tij+1) = d(Tij) +θ(Tij+1),
whereθ(Tij)≥0. The third equation only applies in the absence of reweighting events, which may cause release times to be redefined.
Because the reweighting rules may cause r(Tij+1) < d(Tij), we must slightly modify the definition of “window,” “active,” and “inactive” presented in Section 1.2.
Definition 3.1(Window, Active, and Inactive). IfTij is a job in the adaptable sporadic task system,T, then thewindow ofTij defined as the range [r(Tij), min(d(Tij),r(Tij+1))). Fur- thermore, jobTijisactive at timetifftis inTij’s window (i.e.,t∈[r(Tij),min(d(Tij),r(Tij+1)))), and inactive otherwise.