Rate-Based Resource Allocation Methods
5.3 Workload Models
5.4.2 Periodic Resource Model
Shin and Lee [25] introduced the periodic resource model (, )∗, where is a period ( > 0) and a periodic allocation time (0 < ≤ ). The resource capacity Uof a periodic resource model (, ) is defined as /. The periodic resource model (, ) is defined to characterize the following property:
supply(k, (k+ 1)) = , where k= 0, 1, 2, . . . (5.4)
For the periodic model (, ), its supply bound functionsbf(t) is defined to compute the minimum possible resource supply for every interval length t as follows:
sbf(t)=
t− (k + 1)( − ) if t ∈ [(k + 1) − 2, (k + 1) − ]
(k− 1) otherwise (5.5)
where k= max ((t − ( − ))/, 1). Figure 5.4 illustrates how the supply bound functionsbf(t) is defined for k= 3.
The supply bound functionsbf(t) is a step function and, for easier mathematical analysis, we can define its linear lower bound functionlsbf(t) as follows:
lsbf(t)=
(t− 2( − )) if (t ≥ 2( − ))
0 otherwise (5.6)
We define the service time of a resource model as a time interval that it takes for the resource to provide a resource supply. For the periodic resource model (, ), we define its service time bound function
tbf(t) that calculates the maximum service time of required for a t-time-unit resource supply as follows: tbf(t)= ( − ) + · t + t (5.7) where t = − + t − t if (t− t >0) 0 otherwise (5.8) Θ t Θ Π Π−Θ kΠ−Θ kΠ Θ Θ
FIGURE 5.4 The supply bound function of a periodic resource model (, ) for k= 3.
5.5 Schedulability Analysis
For scheduling unit S(W , R, A), schedulability analysis determines whether a set of timing requirements imposed by the workload set W can be satisfied with the resource supply of R under the scheduling algorithm A. The schedulability analysis is essential to solve the component abstraction and composi- tion problems. In this section, we present conditions under which the schedulability of a scheduling unit can be satisfied when the scheduling unit consists of a periodic workload set scheduled by EDF or RM and bounded-delay or periodic resource models. We then show how to address the component abstraction and composition problems with bounded-delay or periodic interfaces using the schedulability conditions.
5.5.1 Bounded-Delay Resource Model
Mok et al. [21] suggested virtual time scheduling for scheduling tasks with the bounded-delay resource model. Virtual time scheduling is a scheduling scheme whereby schedules are performed according to virtual time instead of actual physical time. For any actual physical time t, its virtual time V (t) over a bounded-delay resource model (α, ) is defined as supply(t)/α. For any virtual time t, its actual time P(t) is defined as the smallest time value such that V (P(t))= t.
This virtual scheduling scheme can be applied to any scheduling algorithms such as EDF and RM. That is, under the virtual time EDF scheduling, the job with the earliest virtual time deadline has the highest priority. Then, we can have the virtual time EDF (VT-EDF) and virtual time RM (VT-RM).
Mok et al. [21] introduced the following theorem for schedulability analysis of a scheduling unit consisting of a periodic task set scheduled by virtual scheduling schemes with the bounded-delay resource model.
Theorem 5.1
Let W denote a periodic task set, W= {Ti(pi, ei)}, and RD(α) denote a dedicated resource with capacity α. If scheduling unit S(W , RD(α), A) is schedulable such that every job of W finishes its execution at least earlier than its deadline, then scheduling unit S(W , (α, ), A) is schedulable, where Ais the virtual scheduling scheme of A.
Sketch of proof
Consider a scheduling algorithm based on actual time being used over RD(α) and its virtual time scheduling scheme being used over (α, ). Then, if there is an event taking place at actual time t over RD(α), this event takes place at virtual time t over (α, ) as well. That is, if a job Jifinishes at time t over RD(α), then the same job Jifinishes at virtual time t over (α, ). For a virtual time t over (α, ), its physical time P(t) is given as P(t) ∈ [t − , t + ]. That is, Jiwill finish at actual time t+ at the latest over (α, ). This means that if every job finishes earlier than its deadline over RD(α), then it is guaranteed to finish prior to its deadline over (α, ).
Virtual time scheduling increases scheduling complexity by introducing the conversion between virtual time and physical time. Shin and Lee [26] introduced the following theorem for the schedulability analysis of scheduling units consisting of a periodic task set scheduled by EDF, rather than VT-EDF, over bounded- delay resource model.
Theorem 5.2
Scheduling unit S(W , R, A), where W = {Ti(pi, ei)}, R = (α, ), and A = EDF, is schedulable even with the worst-case resource supply of R if and only if
Proof
To show the necessity, we prove the contrapositive, i.e., if Equation 5.9 is false, there are some workload members of W that are not schedulable by EDF. If the total resource demand of W under EDF scheduling during t exceeds the total resource supply provided by during t, then there is clearly no feasible schedule. To show the sufficiency, we prove the contrapositive, i.e., if all workload members of W are not schedulable by EDF, then Equation 5.9 is false. Let t2be the first instant at which a job of some workload member Tiof W that misses its deadline. Let t1 be the latest instant at which the resource supplied to W was idle or was executing a job whose deadline is after t2. By the definition of t1, there is a job whose deadline is before t2and which was released at t1. Without loss of generality, we can assume that t= t2− t1. Since Timisses its deadline at t2, the total demand placed on W in the time interval [t1, t2) is greater than the total supply provided by in the same time interval length t.
Example 5.3
Let us consider a workload set W= {T1(100, 11), T2(150, 22)} and a scheduling algorithm A = EDF. The workload utilization UW is 0.26. We now consider the problem of finding a schedulable bounded-delay interfaceB(α, ) of component C(W , A). This problem is equivalent to finding a bounded-delay resource model (α, ) that makes scheduling unit S(W , (α, ), A) schedulable. We can obtain a solution space of (α, ) by simulating Equation 5.9. For any given bounded-delay , we can find the smallest α such that S(W , (α, ), A) is schedulable according to Theorem 5.2. Figure 5.5a shows such a solution space as the gray area for = 1, 10, 20, . . . , 100. For instance, when = 70, the minimum resource capacity α that guarantees the schedulability of S(W , (α, ), A) is 0.4. That is, the bounded-delay interfaceB(0.4, 70) is an optimal schedulable bounded-delay interface of C(W , A), when = 70.
Shin and Lee [26] introduced the following theorem for the schedulability analysis of scheduling units consisting of a periodic task set scheduled by RM, rather than VT-RM, over bounded-delay resource model. Theorem 5.3
Scheduling unit S(W , R, A), where W= {Ti(pi, ei)}, R = (α, ), and A = RM, is schedulable even with the worst-case resource supply of R if and only if
∀Ti ∈ W ∃ti∈ [0, pi] : dbfRM(W , ti, i)≤sbf(ti) (5.10) Proof
Task Ticompletes its execution requirement at time t ∈ [0, pi] if and only if all the execution requirements from all the jobs of higher-priority tasks than Tiand ei, the execution requirement of Ti, are completed at time ti.
The total of such requirements is given by dbfRM(W , ti, i), and they are completed at ti if and only if dbfRM(W , ti, i)=sbf(ti) and dbfRM(W , ti, i) >sbf(ti) for 0≤ ti<ti. It follows that a
0 0.2 0.4 0.6 0.8 1 1 10 20 30 40 50 60 70 80 90 100 Bounded delay Resource capacity 0 0.2 0.4 0.6 0.8 1 1 10 20 30 40 50 60 70 80 90 100 Bounded delay Resource capacity (a) (b)
FIGURE 5.5 Example of solution space of a bounded-delay scheduling interface model (α, ) for a workload set W= {T1(100, 11), T2(150, 22)} under (a) EDF and (b) RM scheduling.
necessary and sufficient condition for Tito meet its deadline is the existence of a ti ∈ [0, pi] such that
dbfRM(W , ti, i)=sbf(ti).
The entire task set is schedulable if and only if each of the tasks is schedulable. This means that there exists a ti∈ [0, pi] such thatdbfRM(W , ti, i)=sbf(ti) for each task Ti∈ W.
Example 5.4
Let us consider a workload set W= {T1(100, 11), T2(150, 22)} and a scheduling algorithm A = RM. The workload utilization UW is 0.26. We now consider the problem of finding a schedulable bounded-delay interfaceB(α, ) of component C(W , A). This problem is equivalent to finding a bounded-delay resource model (α, ) that makes scheduling unit S(W , (α, ), A) schedulable. We can obtain a solution space of (α, ) by simulating Equation 5.3. For any given bounded-delay , we can find the smallest α such that S(W , (α, ), A) is schedulable according to Theorem 5.3. Figure 5.5b shows such a solution space as the gray area for = 1, 10, 20, . . . , 100. For instance, when = 40, the minimum resource capacity α that guarantees the schedulability of S(W , (α, ), A) is 0.4. That is, the bounded-delay interfaceB(0.4, 40) is an optimal schedulable bounded-delay interface of C(W , A), when = 40.
5.5.2 Periodic Resource Model
Shin and Lee [25] present the following theorem to provide an exact condition under which the schedulability of scheduling unit S(W , R, EDF) can be satisfied for the periodic resource model R. Theorem 5.4
Scheduling unit S(W , R, A), where W= {Ti(pi, ei)}, R = (, ), and A = EDF, is schedulable even with the worst-case resource supply of R if and only if
∀0 < t ≤ LCMW, dbfEDF(W , t)≤sbf(t) (5.11)
where LCMWis the least common multiple of pifor all Ti∈ W. Proof
The proof of this theorem can be obtained if is replaced with in the proof of Theorem 5.2.
The schedulability condition in Theorem 5.4 is necessary in addressing the component abstraction problem for a component with the EDF scheduling algorithm. We illustrate this with the following example.
Example 5.5
Let us consider a workload set W0= {T(50, 7), T(75, 9)} and a scheduling algorithm A0= EDF. The work- load utilization UW0 is 0.26. We now consider the problem of finding a schedulable periodic interface
P0=P(P0, E0) of component C0= C(W0, A0). This problem is equivalent to finding a periodic resource model 0= (0, 0) that makes scheduling unit S0= S(W0, 0, A0) schedulable. We can obtain a solution space of 0to this problem by simulating Equation 5.11. For any given resource period 0, we can find the smallest 0such that the scheduling unit S0is schedulable according to Theorem 5.4. Figure 5.6a shows such a solution space as the gray area for each integer resource period 0= 1, 2, . . . , 75. For instance, when 0= 10, the minimum resource capacity U0that guarantees the schedulability of S0is 0.28. So, 0= 2.8. That is, the periodic interfaceP0=P(10, 2.8) is an optimal schedulable interface of C0, when P is given as 10.
Shin and Lee [25] present the following theorem to provide an exact condition under which the schedulability of scheduling unit S(W , R, RM) can be satisfied for the periodic resource model R.
(a) 0 0.2 0.4 0.6 0.8 1 1 10 19 28 37 46 55 64 73 Resource period Resource capacity (b) 0 0.2 0.4 0.6 0.8 1 1 10 19 28 37 46 55 64 73 Resource period Resource capacity
FIGURE 5.6 Schedulable region of periodic resource (, ): (a) under EDF scheduling in Example 5.5 and (b) under RM scheduling in Example 5.6.
Theorem 5.5
Scheduling unit S(W , R, A), where W= {Ti(pi, ei)}, R = (, ), and A = RM, is schedulable even with the worst-case resource supply of R if and only if
∀Ti∈ W ∃ti∈ [0, pi] :dbfRM(W , ti, i)≤sbfR(ti) (5.12) Proof
The proof of this theorem can be obtained if is replaced with in the proof of Theorem 5.3.
We present the following example to show that using Theorem 5.5, we can address the component abstraction problem for a component with the RM scheduling algorithm.
Example 5.6
Let us consider a workload set W0= {T(50, 7), T(75, 9)} and a scheduling algorithm A0= RM. The work- load utilization UW0 is 0.26. We now consider the problem of finding a schedulable periodic interface
P0=P(P0, E0) of component C0= C(W0, A0). This problem is equivalent to finding a periodic resource model 0= (0, 0) that makes scheduling unit S0= S(W0, 0, A0) schedulable. We can obtain a solution space of 0to this problem by simulating Equation 5.12. For any given resource period 0, we can find the smallest 0such that the scheduling unit S0is schedulable according to Theorem 5.5. Figure 5.6b shows such a solution space as the gray area for each integer resource period 0= 1, 2, . . . , 75. For instance, when 0= 10, the minimum resource capacity U0that guarantees the schedulability of S0is 0.35. So, 0= 3.5. That is, the periodic interfaceP0=P(10, 3.5) is an optimal schedulable interface of C0, when P is given as 10.