• No results found

Most schedulability tests for global algorithms are based on a simple principle proposed by Baker (2003). First, let jobTℓ,q be the first job (in some ordering) to miss its deadline. Second, calculate the minimum amount of competing demand due to jobs of other tasks that is necessary forTℓ,q to miss its deadline. This gives a necessary condition for a deadline violation. Finally, calculate an upper bound on the competing demand. Setting the lower bound to be greater than the upper bound gives a sufficient condition for schedulability. Different tests, however, may have different time complexities, and may also differ in predictive power, depending on the assumptions made when calculating the upper and lower bounds on the competing demand.

2.2.1

SB-Test

The schedulability test and analysis techniques proposed by Baruah (2007) are important because their introduction initiated a collection of new results about the schedulability of sporadic task sets (including arbitrary-deadline task sets) under GEDF and several other algorithms on multiprocessor platforms. We henceforth refer to this schedulability test as the “SB-test.”

The test considers a constrained-deadline (Di ≤pi) task system τ scheduled on m identical fully- available processors. The test is derived by considering an interval [rℓ,q−Aℓ, rℓ,q+Dℓ], whereTℓ,q is the problem job that misses its deadline,Aℓis a parameter with range [0, Amaxℓ ], andAmaxℓ is a constant that depends on the parameters of the tasks in τ,m, and the indexℓ. The length of the interval of interest is thus Aℓ+Dℓ. During this interval, the demand due to competing equal-or-higher-priority jobs that can interfere withTℓ,q is considered. Then the following three steps are performed:

S1: The minimum execution demand due to tasks other thanTℓ and jobs ofTℓ that have higher priority than Tℓ,q that is necessary for Tℓ,q to miss its deadline is computed. This demand is m·(Aℓ+Dℓ−eℓ).

S2: An upper-bound on the competing demand M∗(A

ℓ), which depends on τ, m, and Aℓ, is calculated.

S3: The upper boundM∗(A

ℓ) is compared with the lower boundm·(Aℓ+Dℓ−eℓ). If, for each task Tk ∈ τ, M∗(Ak)≤ m·(Ak+Dk−ek) holds for all Ak ∈ [0, Amaxk ], then no job misses its deadline.

Example 2.4. Consider task system τ in Example 1.4 in Section 1.5.3. It has been shown that τ is not HRT schedulable using GEDF on m= 2 processors. In this example, we show that SB-test will fail for τ. Consider a schedule in Figure 2.3 in which the problem job Tℓ,q =T4,1 misses its deadline by ǫ time units. Additionally, suppose that the execution time of job T1,2 is ε time units and the execution time of job T3,1 is 2 +ε time units. We next set Aℓ = 0 and consider the problem interval [rℓ,q, rℓ,q +Dℓ] = [0,8]. For this interval, an upper-bound on competing demand M∗(Aℓ) is at least the competing demand due higher-priority jobs T1,1, T1,2, T2,1, andT3,1, which is 2, ε, 1, and 1 +ε, respectively. Note that even though the execution time of jobT3,1is 2 +ǫ, this job and the problem job T4,1execute in parallel during the interval [2,3) so the competing demand due to jobT3,1is smaller. (In Figure 2.3, the competing demand is shown with black.) The total competing demand is thus 4 + 2ε. We thus haveM∗(A

ℓ)≥4 + 2·ε > m·(Aℓ+Dℓ−eℓ) = 2·(0 + 8−6) = 4, and hence, the SB-test will fail forτ.

Theorem 2.1. (Proved in (Baruah, 2007).) The time complexity of the SB-test is pseudo-polynomial if there exists a constantc such that Usum(τ)≤c < m.

After its introduction, the SB-test was extended in several ways. First, a test with somewhat lower time complexity for the analysis of hard real-time arbitrary-deadline sporadic task systems under GEDF

t

0 2 4 6 8 10 12

T

3,1

T

4,1

T

1,1

T

1,2

T

2,1

T

4,1 rl,q e rl,q+Dl,q competing demand

Figure 2.3: An application of SB-test in Example 2.4.

was proposed (Baruah and Baker, 2008). Second, Guan et al. (2008, 2009) used the proposed tech- niques to derive new schedulability tests for arbitrary-deadline task systems under NPGEDF and static- priority scheduling. Third, Leontyev and Anderson (2008b) independently derived schedulability tests for arbitrary-deadline task systems with specified tardiness constraints under GEDF and NPGEDF. (These tests were developed independently from those by Guan et al.) The distinguishing property of the test proposed by Leontyev and Anderson is that task sets withmixedHRT and SRT constraints can be analyzed. We later discovered that restricted-capacity systems and more general task models can also be analyzed using the approach of the original SB-test. This, however, required significant modifications to the original analysis as described in detail in Chapter 5.

2.2.2

BCL-Test

As mentioned earlier, the SB-test has pseudo-polynomial time complexity. However, if a task set fails the test, it is not clear how “bad” is it, i.e., by how much deadlines can be missed. Also, the unmodified SB-test is only applicable to fully preemptive GEDF. Bertogna et al. (2008) attempted to address these issues by proposing a framework consisting of a family of schedulability tests that are applicable not only to GEDF but also to fixed-priority scheduling and any general work-conserving scheduling algorithm. We refer to this framework and its derivatives as the “BCL-test.” Similarly to the SB-test, the BCL- test assumes constrained deadlines and full processor availability. Additionally, all time quantities are assumed to be integral. The theorem below establishes a schedulability condition for GEDF.

Theorem 2.2. (Proved in (Bertogna et al., 2008).) A task setτ is schedulable under GEDF on

m processors if, for each taskTk ∈τ,

X

i6=k

where Ji,k= D k pi ·ei+ min(ei, Di− D k pi ·pi). (2.3)

The schedulability test in Theorem 2.2 has time complexity ofO(n2), wheren=|τ|. Bertogna et al. also proposed a more accurate iterative version of the test, which has pseudo-polynomial time complexity ofO(n2·max(D

i)).

Example 2.5. Consider the task system τ in Example 1.4 in Section 1.5.3. By Theorem 2.2 it is schedulable on m = 3 processors. Consider, for example, task Tk = T1. For this task, the right- hand side of (2.2) is m·(D1−e1+ 1) = 3·(3−2 + 1) = 6. We now calculate the left-hand side of (2.2). By (2.3), J2,1 = j D1 p2 k ·e2+ min(e2, D2− j D1 p2 k ·p2) = 37·1 + min(1,7−37·7) = 1. J3,1 = 3 and J4,1 = 6 are calculated similarly. Thus, if k = 1, then the left-hand side of (2.2) is min(J2,1, D1−e1+1)+min(J3,1, D1−e1+1)+min(J4,1, D1−e1+1) = min(1,2)+min(3,2)+min(6,2) = 5, and hence (2.2) holds holds fork= 1. The other tasks can be tested similarly.

Experiments presented by Bertogna et al. (2008) showed that the BCL-test has greater accuracy than previously-developed tests for GEDF and fixed-priority scheduling. However, the BCL- and SB-tests do not dominate each other. That is, there exist task sets deemed schedulable by the BCL-test for which the SB-test fails and visa versa.