2.3 Real-Time Scheduling
2.3.3 Global Multiprocessor Real-Time Scheduling
2.3.3.1 Global Fixed-Priority Scheduling
Recall thatFPscheduling policies only differ in the way that priorities are assigned. As mentioned above, Dhall and Liu (1978) demonstrated that theRMpolicy is not an optimal priority assignment forG-FPscheduling. To show this so-calledDhall effect, they constructed the following task set. Givenmprocessors, consider a set ofn > mimplicit-deadline tasksτ ={T1, . . . , Tm+1}, where ei = 2·andpi = 1for1 ≤ i≤ m, and em+1 = 1andpm+1 = 1 +. Under anRMpriority
assignment,τ is not HRT schedulable even thoughusum(τ) →1as→0. An illustration of the
Dhall effect form = 2andn= 3is depicted in Figure 2.14. AsJ3 has the latest deadline in this
example, it would miss its deadline underG-EDF scheduling as well, which demonstrates that the Dhall effect limits both globalRMandG-EDFscheduling. Note, however, thatτ would be schedulable if the priorities ofT1 andT3were switched, that is, the Dhall effect applies specifically to globalRMscheduling and notG-FPscheduling in general.
Devi (2006) further showed that theRMpriority assignment does not necessarily ensure bounded tardiness underG-FPscheduling. She constructed a three-task implicit-deadline example form= 2,
release completion deadline scheduled on processor 1 scheduled on processor 2 1 + ε 0 2ε 1 time T1 T2 T3
Figure 2.14: Illustration of the Dhall effect form= 2.J3,1misses its deadline at timed3,1 = 1 +
because it is not scheduled until time2, which leaves only1−time units until its deadline to completee3= 1time units of work.
wheree1 = e2 = 2, p1 = p2 = 3, ande3 = 4 andp3 = 6 (Devi, 2006). A resulting schedule with unbounded tardiness is illustrated in Figure 2.15. Since jobs ofT3are repeatedly preempted when jobs ofT1 andT2 arrive simultaneously, the response time of successive jobs ofT3 grows unboundedly. Again, note that givingT3higher priority would alleviate the problem. Devi’s example highlights that tasks are vulnerable to starvation underG-FPscheduling and that priorities must be carefully chosen. This is in contrast to the uniprocessor case, where any priority assignment results in bounded tardiness as long as the processor is not overutilized (Joseph and Pandya, 1986).
In fact, there exist task sets that are unschedulable under any priority assignment. Recall Andersson et al.’s task set τABJ consisting of m + 1 implicit-deadline tasks with parameters
ei = 1 +andpi = 2, which is the pathological example that was used to show that there exist “unpartitionable” task sets (see page 68). Onmprocessors,τABJ is not schedulable under anyFP
scheduler: irrespective of the priority assignment, if allm+ 1tasks release a job at timet= 0, then
Jm+1,1 (the job of the lowest-priority task) will not be scheduled until time1 +, at which point there is insufficient time left to complete its1 +units of work by time 2. Further, if all tasks release jobs periodically,Tm+1will have unbounded tardiness since it will receive only1−time units of
processor service every2time units, which fails to match its utilization. This shows that no global FPscheduler can possess a utilization bound exceeding m+12 , just as is the case with partitioned scheduling.
No provably optimal priority assignment or exact feasibility test is known for theG-FPschedul- ing of sporadic tasks (Davis and Burns, 2011b). For a given priority assignment, an upper bound on response times can be derived using multiprocessor response-time tests (see (Davis and Burns, 2011a,b) for a recent survey). A schedulable priority assignment may be found withO(n2)response-
r3,1= 12 r3,2= 18 release completion deadline scheduled on processor 1 scheduled on processor 2 20 15 10 5 0 time T1 T2 T3
Figure 2.15: Devi’s example of unbounded tardiness under G-FPscheduling with RMpriori- ties (Devi, 2006). There are three tasks with parameterse1 =e2 = 2,p1 =p2= 3, ande3 = 4and p3 = 6. If all tasks release jobs periodically starting at time 0, all jobs ofT3 miss their deadlines and exhibit unbounded tardiness. This is becauseu3 = 23, butT3 receives only an allocation of 13 on average.
time test invocations11 by assigning priorities in order from lowest to highest (Davis and Burns,
2011a). However, this approach can fail to find a schedulable priority assignment even if one exists since all known global response time bounds are pessimistic in the general case (worst-case response times may be overestimated). In the HRT case, priority assignment rules that yield higher utilization bounds than one (asRMdoes) have also been devised (e.g., see Andersson, 2008). In the SRT case, besides Devi’s original observation,G-FPscheduling has not received much attention. In principle, multiprocessor response time analysis for arbitrary-deadline tasks could be used to derive tardiness bounds, but to the best of our knowledge, this has not been studied in detail to date.
We do not considerG-FPscheduling in the remainder of this dissertation. As we shall demon- strate in Chapter 4, global scheduling is most compelling in the context of SRT constraints. In an SRT context, there appears to be little reason to favorG-FPoverG-EDF, asG-FPdoes not ensure bounded tardiness in all cases (Devi, 2006), butG-EDFdoes (Devi and Anderson, 2005; Devi, 2006). We therefore focus onG-EDFinstead, which we describe next.