optimal semi-partitioned scheduling in soft real …anderson/papers/ecrts13a.pdf · optimal...

10
Optimal Semi-Partitioned Scheduling in Soft Real-Time Systems * James H. Anderson 1 , Benjamin N. Casses 1 , UmaMaheswari C. Devi 2 , and Jeremy P. Erickson 1 1 Dept. of Computer Science, University of North Carolina at Chapel Hill 2 IBM Research - India Abstract Semi-partitioned real-time scheduling algorithms extend partitioned ones by allowing a (usually small) subset of tasks to migrate. The first such algorithm to be proposed was directed at soft real-time (SRT) sporadic task systems where bounded deadline tardiness is acceptable. That al- gorithm, called EDF-fm, is able to fully utilize the under- lying hardware platform’s available capacity. Moreover, it has the desirable practical property that migrations are boundary-limited, i.e., they can only occur at job bound- aries. Unfortunately, EDF-fm requires restrictions on per- task utilizations, and thus is not optimal. In this paper, a new boundary-limited, semi-partitioned algorithm is pre- sented for SRT systems that is the first such algorithm to be optimal. This algorithm, called EDF-os, is similar to EDF-fm but utilizes several new mechanisms that obviate the need for per-task utilization restrictions. Experiments presented herein show that, not only is EDF-os provably better than EDF-fm with respect to schedulability, tardiness bounds under EDF-os are often much lower as well. 1 Introduction Multiprocessor real-time scheduling algorithms may follow a partitioned or global approach or some hybrid of the two. Under partitioned scheduling, tasks are statically as- signed to processors, while under global scheduling, they are scheduled from a single run queue and hence may mi- grate. When comparing different scheduling approaches, one criterion is optimality, i.e., the ability to correctly sched- ule (without timing constraint violations) any task system for which a correct schedule exists. In the case of implicit- deadline (see Sec. 2) sporadic task systems, optimality can be achieved via global scheduling, but not partitioning; however, global scheduling entails higher runtime over- heads. When designing a hybrid approach, the goal is usu- ally to attain optimal or near-optimal behavior but with less overhead than a truly global approach. One such hybrid approach is semi-partitioned schedul- ing, which extends partitioned scheduling by allowing those tasks that cannot be feasibly assigned to processors to mi- grate. Semi-partitioned scheduling was first proposed for * Work supported by NSF grants CNS 1016954, CNS 1115284, and CNS 1239135; ARO grant W911NF-09-1-0535; and AFRL grant FA8750- 11-1-0033. supporting soft real-time (SRT) sporadic task systems for which bounded deadline tardiness is allowed [1]. Subse- quently, several semi-partitioned algorithms were proposed for hard real-time (HRT) systems [2, 3, 6, 7, 8, 11, 13, 14, 15, 16, 17, 18, 19, 20, 25]. The original SRT algorithm proposed in [1], called EDF- fm, is able to fully utilize the underlying hardware plat- form’s available capacity. Moreover, it is boundary-limited: a migrating task may only migrate between job boundaries (i.e., between successive invocations). Unfortunately, EDF- fm requires restrictions on per-task utilizations, and thus is not optimal. In their simplest form, these restrictions pre- clude any task utilization from exceeding 0.5, though they can be relaxed somewhat, as discussed below. Of the HRT algorithms cited above, two are optimal, at least in theory, namely RUN [25] and EKG [3]. How- ever, both are optimal only for implicit deadline periodic task systems, and EKG becomes optimal (for periodic sys- tems) only when a configurable parameter k becomes arbi- trarily close to the number of processors, which unrealis- tically increases preemption frequency. Additionally unlike EDF-fm, neither of these algorithms is boundary-limited. Thus, they allow jobs to migrate, which can be expensive in practice if jobs maintain much cached state. Contributions. In this paper, we present the first boundary-limited, semi-partitioned scheduling algorithm that is optimal for SRT sporadic task systems. This algo- rithm, which we call EDF-os (e arliest-d eadline-f irst-based o ptimal s emi-partitioned scheduling), is based on EDF-fm. EDF-fm was designed with implicit-deadline sporadic task systems in mind. It functions in two phases: an offline assignment phase, where tasks are assigned to processors and fixed tasks (which do not migrate) are distinguished from migrating ones (which do); and an online execution phase, where invoked tasks are scheduled via rules that ex- tend earliest-deadline-first (EDF) scheduling to account for fixed and migrating tasks. EDF-fm’s per-task utilization re- strictions (the source of its non-optimality) arise for two reasons. First, the proof of bounded tardiness for EDF-fm relies crucially on the fact that migrating tasks never miss deadlines. Such misses are problematic because they create complex “couplings” of processors that are difficult to ana- lyze: a miss by a migrating task on one processor can delay the processing of work due to it on another processor. Sec- ond, in EDF-fm, two migrating tasks may be assigned to the

Upload: dinhdieu

Post on 18-Sep-2018

230 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Optimal Semi-Partitioned Scheduling in Soft Real …anderson/papers/ecrts13a.pdf · optimal semi-partitioned scheduling), is based on EDF-fm. EDF-fm was designed with implicit-deadline

Optimal Semi-Partitioned Scheduling in Soft Real-Time Systems ∗

James H. Anderson1, Benjamin N. Casses1, UmaMaheswari C. Devi2, and Jeremy P. Erickson1

1Dept. of Computer Science, University of North Carolina at Chapel Hill2IBM Research - India

AbstractSemi-partitioned real-time scheduling algorithms extendpartitioned ones by allowing a (usually small) subset oftasks to migrate. The first such algorithm to be proposedwas directed at soft real-time (SRT) sporadic task systemswhere bounded deadline tardiness is acceptable. That al-gorithm, called EDF-fm, is able to fully utilize the under-lying hardware platform’s available capacity. Moreover, ithas the desirable practical property that migrations areboundary-limited, i.e., they can only occur at job bound-aries. Unfortunately, EDF-fm requires restrictions on per-task utilizations, and thus is not optimal. In this paper, anew boundary-limited, semi-partitioned algorithm is pre-sented for SRT systems that is the first such algorithm tobe optimal. This algorithm, called EDF-os, is similar toEDF-fm but utilizes several new mechanisms that obviatethe need for per-task utilization restrictions. Experimentspresented herein show that, not only is EDF-os provablybetter than EDF-fm with respect to schedulability, tardinessbounds under EDF-os are often much lower as well.

1 IntroductionMultiprocessor real-time scheduling algorithms may followa partitioned or global approach or some hybrid of thetwo. Under partitioned scheduling, tasks are statically as-signed to processors, while under global scheduling, theyare scheduled from a single run queue and hence may mi-grate. When comparing different scheduling approaches,one criterion is optimality, i.e., the ability to correctly sched-ule (without timing constraint violations) any task systemfor which a correct schedule exists. In the case of implicit-deadline (see Sec. 2) sporadic task systems, optimality canbe achieved via global scheduling, but not partitioning;however, global scheduling entails higher runtime over-heads. When designing a hybrid approach, the goal is usu-ally to attain optimal or near-optimal behavior but with lessoverhead than a truly global approach.

One such hybrid approach is semi-partitioned schedul-ing, which extends partitioned scheduling by allowing thosetasks that cannot be feasibly assigned to processors to mi-grate. Semi-partitioned scheduling was first proposed for

∗Work supported by NSF grants CNS 1016954, CNS 1115284, andCNS 1239135; ARO grant W911NF-09-1-0535; and AFRL grant FA8750-11-1-0033.

supporting soft real-time (SRT) sporadic task systems forwhich bounded deadline tardiness is allowed [1]. Subse-quently, several semi-partitioned algorithms were proposedfor hard real-time (HRT) systems [2, 3, 6, 7, 8, 11, 13, 14,15, 16, 17, 18, 19, 20, 25].

The original SRT algorithm proposed in [1], called EDF-fm, is able to fully utilize the underlying hardware plat-form’s available capacity. Moreover, it is boundary-limited:a migrating task may only migrate between job boundaries(i.e., between successive invocations). Unfortunately, EDF-fm requires restrictions on per-task utilizations, and thus isnot optimal. In their simplest form, these restrictions pre-clude any task utilization from exceeding 0.5, though theycan be relaxed somewhat, as discussed below.

Of the HRT algorithms cited above, two are optimal,at least in theory, namely RUN [25] and EKG [3]. How-ever, both are optimal only for implicit deadline periodictask systems, and EKG becomes optimal (for periodic sys-tems) only when a configurable parameter k becomes arbi-trarily close to the number of processors, which unrealis-tically increases preemption frequency. Additionally unlikeEDF-fm, neither of these algorithms is boundary-limited.Thus, they allow jobs to migrate, which can be expensive inpractice if jobs maintain much cached state.

Contributions. In this paper, we present the firstboundary-limited, semi-partitioned scheduling algorithmthat is optimal for SRT sporadic task systems. This algo-rithm, which we call EDF-os (earliest-deadline-first-basedoptimal semi-partitioned scheduling), is based on EDF-fm.

EDF-fm was designed with implicit-deadline sporadictask systems in mind. It functions in two phases: an offlineassignment phase, where tasks are assigned to processorsand fixed tasks (which do not migrate) are distinguishedfrom migrating ones (which do); and an online executionphase, where invoked tasks are scheduled via rules that ex-tend earliest-deadline-first (EDF) scheduling to account forfixed and migrating tasks. EDF-fm’s per-task utilization re-strictions (the source of its non-optimality) arise for tworeasons. First, the proof of bounded tardiness for EDF-fmrelies crucially on the fact that migrating tasks never missdeadlines. Such misses are problematic because they createcomplex “couplings” of processors that are difficult to ana-lyze: a miss by a migrating task on one processor can delaythe processing of work due to it on another processor. Sec-ond, in EDF-fm, two migrating tasks may be assigned to the

Page 2: Optimal Semi-Partitioned Scheduling in Soft Real …anderson/papers/ecrts13a.pdf · optimal semi-partitioned scheduling), is based on EDF-fm. EDF-fm was designed with implicit-deadline

same processor. EDF-fm schedules the jobs of such tasks onan EDF basis and prioritizes them over jobs of fixed tasks.To avoid misses by migrating tasks as desired, migratingtasks are simply required to have a utilization of at most 0.5(or more generally, those sharing a processor must have acombined utilization of at most 1.0). The fact that migratingtasks do not miss deadlines then follows trivially from theoptimality of EDF on one processor [23].

In EDF-os, we eliminate such utilization restrictions bymodifying both phases of EDF-fm. In particular, we modifythe assignment phase by considering tasks in a certain orderand by allowing a migrating task to execute on any numberof processors (in EDF-fm, such a task executes on at mosttwo processors). We modify the scheduling phase by stat-ically prioritizing the jobs of certain migrating tasks overthose of others (in EDF-fm, such jobs are always sched-uled on an EDF basis). As a result of our modifications,migrating tasks can miss deadlines. However, we show thatthe complex “coupling” noted above can be managed in ouranalysis by leveraging properties that follow from our mod-ified assignment phase and the more predictable nature ofthe static prioritizations we introduce. This analysis showsthat EDF-os is optimal: deadline tardiness is bounded pro-vided total utilization is at most the system’s capacity andper-task utilizations are at most 1.0. Moreover, this claimof optimality holds regardless of whether deadlines are im-plicit, constrained, or unrestricted (see Sec. 2).

Organization. We present our optimality proof (Sec. 4) af-ter first providing needed background (Sec. 2) and describ-ing EDF-os in detail (Sec. 3). We then discuss extensions toour main results (Sec. 5), present an experimental compari-son of EDF-os and EDF-fm (Sec. 6), and conclude (Sec. 7).While EDF-os is provably superior to EDF-fm with re-spect to schedulability, our experiments show that tardinessbounds under EDF-os are often much lower as well.

2 BackgroundWe consider the scheduling of a sporadic task system τ ={τ1, τ2, . . . , τN} onM identical processors—we assume fa-miliarity with the sporadic task model [24]. Task τi is speci-fied by (Ci, Ti), where Ci is its maximum per-job executionrequirement and Ti is its period. The jth job of τi, denotedτi,j , has release time ri,j and deadline di,j . We initiallyrestrict attention to implicit deadlines (di,j = ri,j + Ti)but later (in Sec. 5) consider both constrained deadlines(di,j ≤ ri,j+Ti) and unrestricted deadlines (no relationshipbetween di,j and ri,j + Ti assumed). We denote the utiliza-tion of τi by Ui = Ci/Ti, and the pth processor as Pp. Weassume that time is discrete.

In the scheduling algorithms we consider, each task is al-located a non-zero fraction, or share, of the available utiliza-tion of 1.0 on certain processors. Task τi’s share (potentiallyzero) on Pp is denoted si,p. The total share allocation on Ppis denoted σp ,

∑τi∈τ si,p. We require that σp ≤ 1.0 and

that each task’s total share allocation matches its utilization:Ui =

∑Mk=1 si,k. If τi has non-zero shares on multiple (only

one) processor, then it is a migrating (fixed) task.

initially si,p = 0 and σp = 0 for all i and pp := 1;for i := 1 to N do

if Ui ≤ 1− σp then /∗ τi is fixed ∗/si,p := Ui;σp := σp + Ui

else /∗ τi is migrating ∗/si,p, si,p+1 := (1− σp), Ui − (1− σp);σp, σp+1 := 1, si,p+1

fi;if σp = 1 then p := p+ 1 fi

od

Figure 1: EDF-fm assignment phase.

In the scheduling algorithms we consider, each job ofeach task τi executes on a specific processor. The fractionof τi’s jobs (potentially zero) that execute on processor Ppis denoted fi,p. Such fractions are commensurate with τi’sshare allocations:

fi,p =si,pUi

. (1)

The lowest-indexed processor to which migrating task τi as-signs jobs is called its first processor.

If a job τi,j completes at time t, then its tardiness ismax (0, t−di,j). We seek scheduling algorithms that ensurebounded tardiness: for each task, there is a constant upperbound on the tardiness of any of its jobs. We consider onlyfeasible task systems that satisfy the following conditions.

∀τi ∈ τ, Ui ≤ 1, (2)∑τi∈τ

Ui ≤M. (3)

EDF-fm. The EDF-os algorithm presented herein extendsthe EDF-fm algorithm proposed by Anderson et al. [1].EDF-fm consists of assignment and execution phases. Dur-ing the assignment phase, tasks are allocated shares offlinevia the procedure in Fig. 1. This procedure allocates proces-sor utilization (as shares) to tasks by considering each pro-cessor and task in turn. If the currently considered processorPp has sufficient unallocated utilization, then the currentlyconsidered task τi is assigned to it as a fixed task; otherwise,τi exhausts the remaining unallocated utilization of Pp andreceives the rest of its needed allocation from Pp+1.

In the execution phase, released jobs are scheduled on-line without migration (i.e., each job executes on only oneprocessor). The following prioritizations are used on eachprocessor: migrating tasks are prioritized over fixed ones,and jobs of a given type (fixed or migrating) are prioritizedagainst each other on an EDF basis. By the assignment pro-cedure in Fig. 1, at most two migrating tasks can have non-zero shares on a given processor. It is required that for anytwo such tasks, their combined utilization is at most 1.0.This ensures that such tasks do not miss deadlines (which isa crucial property in the tardiness analysis of EDF-fm).

To ensure that fixed tasks have bounded tardiness, it isimportant that no processor be overloaded in the long run.

Page 3: Optimal Semi-Partitioned Scheduling in Soft Real …anderson/papers/ecrts13a.pdf · optimal semi-partitioned scheduling), is based on EDF-fm. EDF-fm was designed with implicit-deadline

Figure 2: EDF-fm task assignment for Ex. 1. Shares of migratingtasks are shown in a darker shade. τ1 = (4, 5) is a fixed task onP1, τ2 = (2, 4) migrates between P1 and P2 with with s2,1 = 1

5

and s2,2 = 310

, and so on. After assignment, 120

of P3 is unused.

This can be ensured by employing a mechanism that en-sures that, in the long run, each migrating task τi submitsan appropriate fraction of its jobs to each of the two proces-sors on which it executes. Such fractions are given by (1). InEDF-fm, the exact allocation of such jobs to processors isdone by leveraging results from work on Pfair scheduling.We illustrate this with an example below.Ex. 1. Consider the task system τ = {(4, 5), (2, 4), (1, 2),(2, 5), (3, 4)}, with

∑τi∈τ Ui = 59

20 ≤ 3. Hence, τ is feasi-ble on 3 processors. The assignment phase of EDF-fm willproduce the share allocations in Fig. 2 when applied to thetasks in τ in the listed order.1 Note that τ2 has a share of 1

5

on P1 and 310 on P2. Thus, by (1), f1,1 = ( 1

5 )/( 12 ) = 2

5 ofits jobs should execute on P1 in the long run, and f1,2 =( 3

10 )/( 12 ) = 3

5 of is jobs should execute on P2. At runtime,EDF-fm determines which processor to allocate to a newlyreleased job of such a migrating task by applying a formulathat is derived by considering a Pfair schedule [4] of certainfictitious periodic tasks. To avoid confusion, we will callthese fictitious tasks “processes” (instead of tasks). For thecase of τ2 in Ex. 1, two Pfair processes T and U are con-sidered with utilizations 2

5 and 35 , respectively. These uti-

lizations match the fractions 25 and 3

5 as computed using (1)above. Job-to-processor allocations are made for τ2 by con-ceptually maintaining a single-processor Pfair schedule ofT and U assuming each is always available for execution.Whenever a new job τ2,j of τ2 is released, the Pfair sched-ule is extended by one quantum. If process T is scheduledduring that quantum, then τ2,j is scheduled on P1 (τ2’s firstprocessor); if process U is instead scheduled, then τ2,j isscheduled on P2. This is illustrated in Fig. 4. By the def-inition of a Pfair schedule, by any integral point in time tin the Pfair schedule under consideration (where each inte-gral time unit is one quantum), process T will have receivedapproximately 2

5 · t quanta, and U will have received ap-proximately 3

5 · t quanta. Thus, by any point in time in theEDF-fm schedule, approximately 2

5 of the released jobs ofτ2 will have been assigned to P1 and approximately 3

5 to P2,as desired.

More specifically, in a Pfair schedule of a periodic sys-

1Strategies for selecting an assignment order are considered in [1].

release

deadline

! late execution

scheduled job

late job

Figure 3: Key for Figures 4– 6, 9 and 11.

1 5 10job index

T25_

U35_

P1

12 17 22 50 55time

P2

τ2,4

τ2,5 τ2,6

τ2,7

τ2,8

Figure 4: Using a fictitious Pfair schedule to assign jobs of τ2from Ex. 1. The upper part of the figure shows a Pfair schedulefor two processes T = 2

5and U = 3

5. (In such a schedule, each

quantum of a task’s execution has a release time and deadline.) Thelower part shows how released jobs of τ2 are distributed betweenP1 and P2 based on the Pfair schedule, starting with the fourth jobof τ2 (for clarity, no jobs of other tasks are depicted in the lowerpart). Since job releases are sporadic, consecutive jobs of τ2 maybe separated by more than T2, as seen for jobs τ2,6 and τ2,7.

tem of processes that do not over-utilize the assumed pro-cessor platform, by the integral time instant t, a processwith utilization u will have received between bu · tc anddu · te quanta. In our case, a single-processor platform isassumed and the Pfair processes under consideration willalways have a total utilization of 1.0. Based on this propertyof Pfair schedules, the following is shown in [1].

Property 1. In any EDF-fm schedule, out of the first n jobsof a migrating task τi, the number of jobs assigned to someprocessor Pp is between bfi,p · nc and dfi,p · ne

EDF-fm does not really maintain a fictitious Pfairschedule per migrating task to assign its jobs; rather, aformula derived from Pfair scheduling principles is usedthat maps the index of a newly-released job to a processor.For example, for task τ2 in Ex. 1, its fourth job would bemapped to P1, its fifth job to P2, and so on (see Fig. 4).Fig. 5 shows the EDF-fm schedule for the task system inEx. 1 up to time 36, assuming each job is released as soonas possible.

Ex. 2. We now give an example task system that showsthat if the task utilization restriction of EDF-fm is violated,then migrating tasks may miss deadlines. Such misses in-validate the tardiness analysis given in [1]. Consider thesystem τ = {(4, 6), (2, 3), (5, 6), (2, 3), (1, 2), (2, 3)}. Be-

Page 4: Optimal Semi-Partitioned Scheduling in Soft Real …anderson/papers/ecrts13a.pdf · optimal semi-partitioned scheduling), is based on EDF-fm. EDF-fm was designed with implicit-deadline

(1,2)

(2,4)

(4,5)

(3,4)

(2,5)

P1

P2

P3

τ1

Figure 5: An EDF-fm schedule for the task system in Ex. 1.f2,1 = 2

5and f2,2 = 3

5. f4,2 = f4,3 = 1

2.

(5,6)

(2,3)P2

time

τ2

τ3! ! ! ! !! !

0 5 10 15 20 25

Figure 6: An EDF-fm schedule for the task system in Ex. 2 show-ing execution on P2. Jobs from τ3 = (5, 6) complete late.

cause∑τi∈τ Ui = 4 ≤ 3, τ is feasible on 4 processors.

Because all task utilizations exceed 12 , EDF-fm’s utilization

restriction will be violated regardless of the order in whichtasks are considered for assignment. For the listed order, weshow that deadlines may be missed by migrating tasks onP2. Because τ1 = (4, 6) will be assigned as a fixed task onP1, τ2 will migrate between P1 and P2 with s2,1 = 1

3 ands2,2 = 1

3 . Since only 23 of the available utilization of P2 re-

mains after assigning τ2, τ3 = (5, 6) will migrate betweenP2 and P3 and its share on P2 will be s3,2 = 2

3 . Note thatf2,1 = 1

3 ·32 = 1

2 . The Pfair-based mapping formula willassign odd-indexed jobs of τ2 to P1 and even-indexed jobsof τ2 to P2. For τ3, f3,2 = 2

3 ·65 = 4

5 . The mapping formulawill assign the first four jobs in each consecutive group offive jobs of τ3 to P2. Fig. 6 shows the first 25 time units ofexecution on P2 assuming deadline ties are broken in favorof τ2. Note that each of the first four jobs of τ3 misses itsdeadline.

3 EDF-os

EDF-os consists of assignment and execution phases, likeEDF-fm. Its assignment phase is described by the procedurein Fig. 7. An assignment is produced in two steps: first, asmany tasks as possible are assigned as fixed tasks, usinga worst-fit decreasing bin-packing heuristic. Then, all re-maining tasks are assigned (in decreasing utilization order)as migrating tasks by considering each processor and re-maining task in turn. Each such task is allocated non-zeroshares from a succession of processors until the sum of itsshares equals its utilization. Like the assignment procedure

for EDF-fm, this procedure ensures that there are at mosttwo migrating tasks with non-zero shares on any processor.However, a migrating task can now have non-zero shares onmore than two processors. Note that we are no longer im-posing any restrictions on task utilizations (other than thatthey be at most 1.0), so it is now possible that migratingtasks may be tardy. Note also that, because tasks are con-sidered in decreasing utilization order, the utilization of anymigrating task is no more than that of any fixed task.

The same assignment scheme has been used by Sarkaret al. [26] in work on frame-based fair scheduling for rate-based task systems. Specifically, this scheme is used in theirwork to determine the number of units of execution to allo-cate for each task in a frame (specified interval of time).

In the execution phase, EDF-os works as follows. Asin EDF-fm, each job executes on only one processor. Onany processor, migrating tasks are statically prioritized overfixed ones, and fixed tasks are prioritized against each otherusing EDF (like in EDF-fm). Also, if a processor has twomigrating tasks τi and τi+1, then τi is statically prioritizedover τi+1 (this differs from EDF-fm). That is, a migratingtask executes with highest priority on any processor that isnot its first processor (recall Sec. 2). Informally, this ruleensures that tardiness is “created” for a migrating task onlyon its first processor; on its other processors, one of its jobswill be tardy only if its predecessor job was also tardy. Infact, any such job assigned to a non-first processor will bescheduled as soon as it is eligible (i.e., as soon as it has beenreleased and its predecessor has finished). As we shall see inthe tardiness bound proof in Sec. 4, this very predictable ex-ecution behavior for “non-first-processor” jobs can be lever-aged to derive a tardiness bound for all migrating tasks, andin turn all fixed tasks.

Because a migrating task may execute on more than twoprocessors in EDF-os, we must use a slightly altered ver-sion of EDF-fm’s Pfair-based job assignment policy. In par-ticular, if a migrating task executes on n processors, thenwe conceptually manage n Pfair processes with utilizationsthat sum to 1.0, where each Pfair process corresponds to aprocessor, as before. If, in a schedule of these n processeson a single processor, the kth process is allocated time slott, then the tth job of the migrating task is assigned to pro-cessor Pk. With this generalized assignment policy, Prop. 1continues to hold.

Ex. 1 (revisited). We now discuss how EDF-os wouldschedule the task system from Ex. 1 in Sec. 2. For conve-nience, we list here the tasks in decreasing utilization order:τ = {(4, 5), (3, 4), (2, 4), (1, 2), (2, 5)}. Fig. 8 shows howEDF-os assigns these tasks to processors. Note that nowthere is only one migrating task, τ5, which executes on P1

and P2. Because its shares are the same on these two pro-cessors, we have f5,1 = 1

2 and f5,2 = 12 . Our Pfair-based

job assignment policy will assign odd-numbered jobs of τ5to P1 and the even numbered ones to P2. Fig. 9 shows an ex-ample schedule of this system. In this schedule, only fixedtasks miss deadlines. Note also that jobs of τ5 alternate be-tween P1 and P2.

Page 5: Optimal Semi-Partitioned Scheduling in Soft Real …anderson/papers/ecrts13a.pdf · optimal semi-partitioned scheduling), is based on EDF-fm. EDF-fm was designed with implicit-deadline

initially si,p = 0 and σp = 0 for all i and p/∗ assign fixed tasks via a worst-fit decreasing packing ∗/Index tasks in the order of heaviest utilization to lightest;for i := 1 to N do

Select p such that σp is minimal;if Ui > 1− σp then

break /∗ can’t assign any more fixed tasks ∗/fi;si,p, σp, last := Ui, σp + Ui, ifi

od;/∗ now assign migrating tasks ∗/p := 1;for i := last + 1 to N do

remaining := Ui

repeatsi,p := min(remaining , (1− σp));σp, remaining := σp + si,p, remaining − si,p;if σp = 1 then p := p+ 1 fi

until remaining = 0od

Figure 7: EDF-os assignment phase.

Figure 8: EDF-os task assignment for Ex. 1: τ1 = (4, 5), τ2 =

(3, 4), τ3 = (2, 4), and τ4 = (1, 2) are assigned as fixed tasks.τ5 = (2, 5) (shaded) is the only migrating task. For it, s5,1 = 1

5

and s5,2 = 15

. After assignment, 120

of P2 is unused.

Ex. 2 (revisited). Next, we consider how EDF-os wouldschedule the task system from Ex. 2 in Sec. 2. As before,we list tasks in decreasing utilization order for convenience:τ = {(5, 6), (4, 6), (2, 3), (2, 3), (2, 3), (1, 2)}. The task as-signment that EDF-os produces is shown in Fig. 10. Notethat this time there are two migrating tasks, and one of them,τ5 = (2, 3), executes on three processors, P1, P2, and P3.Fig. 11 shows an example EDF-os schedule for this tasksystem.

4 Tardiness BoundsIn this section, we derive tardiness bounds for tasks sched-uled by EDF-os. We consider migrating and fixed tasks sep-arately, in Secs. 4.1 and 4.2, respectively. In the rest of thissection, we assume that the task system τ being analyzed isfeasible (refer to (2) and (3)). We denote the set of all fixedtasks on processor Pp as τfp , and the sum of the shares of allfixed tasks on Pp as σfp .

We begin by establishing several properties that followfrom the assignment procedure in Fig. 7. Recall that, as dis-cussed in Sec. 3, Prop. 1 continues to hold for EDF-os.

(1,2)

(2,4)

(4,5)

(2,5)

(3,4)

(2,5)

Figure 9: EDF-os schedule for Ex. 1. f5,1 = f5,2 = 12

.

Figure 10: EDF-os task assignment for Ex. 2.

Property 2. For each migrating task τi, Ui < 1.

This property follows from the worst-fit decreasingheuristic used by our assignment procedure. Because τ isfeasible, if Ui < 1 fails to hold, then Ui = 1 holds. More-over, i ≤ M , for otherwise, total utilization would exceedM . These facts imply that τi would have been assigned as afixed task to a dedicated processor.

Property 3. There are no more than two migrating tasksthat assign jobs to processor Pp. If there are two migratingtasks that assign jobs to Pp, then Pp is the first processorfor exactly one of them.

It can be shown by induction that when our assignmentprocedure first considers a migrating task τi, there can be atmost one migrating task already assigned to the currentlyconsidered processor (which will be τi’s first processor).From this, Prop. 3 follows.

Property 4. For processor Pp with one or more migratingtasks τi (and possibly τk) that have shares si,p (and sk,p),σfp + si,p + sk,p ≤ 1.

Our assignment procedure does not allow σp to exceed1.0 (i.e., Pp cannot be over-allocated).

Property 5. If processor Pp contains migrating tasks τi andτk and Pp is the first processor of τk, then si,p + Uk < 1.

Because tasks are assigned in order of decreasing uti-lization, there must be some fixed task τf on Pp such that

Page 6: Optimal Semi-Partitioned Scheduling in Soft Real …anderson/papers/ecrts13a.pdf · optimal semi-partitioned scheduling), is based on EDF-fm. EDF-fm was designed with implicit-deadline

(1,2)

(2,3)P4

P1(5,6)

(2,3)

P2(2,3)

(4,6)

P3 (2,3)

(2,3)

(1,2)

τ2

τ3

τ5

τ4

0 5 10 15 20time

25

Figure 11: EDF-os schedule for Ex. 2. f5,1 = 14

, f5,2 = 12

andf5,3 = 1

4. f6,3 = 1

3and f6,4 = 2

3.

Uf ≥ Uk. Therefore, by Prop. 4 and because sk,p > 0,Prop. 5 holds.

Property 6. Out of any c consecutive jobs of some migrat-ing task τi, the number of jobs released on Pp is at mostfi,p(c− 1) + 2.

By Prop. 1, if τi executes jobs on Pp, then out of its firstn jobs, the number assigned to Pp is between bfi,p · nc anddfi,p · ne. Thus, out of any c consecutive jobs of τi, wherethe index of the first such job is j, the number of jobs as-signed to Pp is at most

dfi,p · (j + c− 1)e − bfi,p · (j)c≤ {Since dx+ ye ≤ dxe+ dye}dfi,p · (j)e+ dfi,p · (c− 1)e − bfi,p · (j)c

≤ {Since dxe − bxc ≤ 1}dfi,p · (c− 1)e+ 1

< {Since dxe < x+ 1}fi,p · (c− 1) + 2.

4.1 Tardiness Bounds for Migrating Tasks

In this subsection, we derive a tardiness bound for migratingtasks. Because such tasks are statically prioritized over fixedones, we need not consider fixed tasks in this derivation.Thus, all referenced tasks in this subsection are assumed tobe migrating.

First, we provide a bound on the work from a migratingtask that competes with an arbitrary task. This result will beused both here and in the next subsection.

Lemma 1. Consider a migrating task τi that releases jobson processor Pp. Let t0 ≥ 0 and tc > t0. If no job of τihas tardiness exceeding ∆i, then the demand from τi in theinterval [t0, tc) on Pp is less than

(si,p)(tc − t0) + (si,p)(∆i + Ti) + 2Ci.

Proof. Since we assume that the maximum tardiness of τi isat most ∆i, we know that any job released by τi will takeno more than Ti + ∆i time units to complete, so jobs ofτi released before t0 − (∆i + Ti) cannot create demand in[t0, tc). Thus, competing demand for execution from jobsof τi in the interval [t0, tc) comes from jobs of τi releasedin [t0 −∆i − Ti, tc). Since the minimum inter-release timebetween jobs of τi is Ti, there are at most

⌈tc−(t0−∆i−Ti)

Ti

⌉such jobs released in this interval. Since τi is a migratingtask, the number of jobs executed on Pp out of any numberof consecutive jobs of τi is limited by Prop. 6. Thus, thedemand from τi in the interval [t0, tc) on Pp is at most(

fi,p ·(⌈

tc − (t0 −∆i − Ti)Ti

⌉− 1)

+ 2)Ci

< {Since dxe < x+ 1}(fi,p ·

((tc − (t0 −∆i − Ti)

Ti+ 1)− 1)

+ 2)Ci

= {Simplifying}(fi,p ·

(tc − t0 + ∆i + Ti

Ti

)+ 2)Ci

= {By (1)}(si,p)(tc − t0) + (si,p)(∆i + Ti) + 2Ci.

We now show that we can upper-bound the tardiness of amigrating task τ` by considering an alternate job allocationin which all of its jobs execute on its first processor, Pp. (Forease of understanding, we will be using the indices “`” and“h” in the rest of this subsection to reflect lower and higherstatic priorities, respectively.) Note that Prop. 5 ensures that,when ignoring fixed tasks (as we do in this subsection), Pphas sufficient capacity to accommodate any jobs of τ` wemay move to it from other processors. This is because theremust exist a fixed task on Pp with utilization at least that ofτ`. (Our usage of a worst-fit decreasing assignment strategyis crucially exploited here.)

Lemma 2. If every job of migrating task τ` that executes ona non-first processor of τ` is moved to its first processor Pp,then no job of τ` will complete earlier. Moreover, if anothermigrating task τh executes on Pp, then such job moves donot affect it.Proof. If τ` shares Pp with another migrating task τh, thenby the prioritization rules of EDF-os, τh is not impacted bymoving jobs of τ` to Pp, since τh has higher priority than τ`(we are not changing the static prioritization of these tasks).

We now show that moving a single job τ`,k of τ` to Ppcannot lessen the completion time of any job of τ`. By in-ducting over all such moves, the lemma follows.

Because job τ`,k is being moved, it was originally ex-ecuting on a non-first processor of τ`. Hence, τ`,k was ofhighest priority on that processor and executed immediatelyto completion as soon as it was eligible (i.e., by the later ofits release time and the completion time of its predecessorτ`,k−1, if any). After the move, its execution may be delayedby jobs of τh, which have higher priority than those of τ` on

Page 7: Optimal Semi-Partitioned Scheduling in Soft Real …anderson/papers/ecrts13a.pdf · optimal semi-partitioned scheduling), is based on EDF-fm. EDF-fm was designed with implicit-deadline

Pp. Thus, after the move, τ`,k cannot complete earlier, andmay complete later. If it completes later, then this cannotcause subsequent jobs of τ` to complete earlier (earlier jobsof τ` are clearly not impacted).

Thm. 1 below provides tardiness bounds for migratingtasks. If a migrating task τ` shares its first processor withanother migrating task τh, then the bound for τ` dependson that of τh. The bounds for all migrating tasks can becomputed inductively, with the following lemma providingthe base case.

Lemma 3. The migrating task τh with the lowest-indexedfirst processor Pp does not share Pp with another migratingtask.Proof. By the assignment procedure of EDF-os, no migrat-ing task other than τh executes on Pp.

Theorem 1. If τ` is the only task on its first processor Pp,then it will have no tardiness. Otherwise, it shares its firstprocessor with exactly one task τh, and it has tardiness nolarger than

∆` ,(sh,p)(∆h + Th) + 2Ch + C`

1− sh,p− T`, (4)

where ∆h is the maximum tardiness of τh.Proof. Denote as Pp the first processor of τ`. By Lem. 2, wecan establish the desired tardiness bound by assuming thatall jobs of τ` run on Pp. We make this assumption in theremainder of the proof.

If τ` is the only migrating task on Pp, then its jobs willbe of highest priority on Pp. Thus, by Prop. 2 and Lem. 2,τ` will never be tardy.

In the rest of the proof, we assume that τ` shares Pp withanother migrating task. By Prop. 3, there is a unique suchtask τh, as stated in the theorem. By the prioritization rulesused by EDF-os, τh has higher priority than τ`.

Consider job τ`,j with release time r`,j and deadline d`,j .For purposes of contradiction, assume that τ`,j’s tardinessexceeds ∆`. According to the prioritization rules used byEDF-os, τ`,j’s execution may be impacted only by jobsfrom τh and by jobs from τ` with deadlines before d`,j . Wenow upper bound the processor demand impacting τ`,j byconsidering a certain time interval, as defined next.

Interval [t0, tc). Let t0 be the latest point in time at or be-fore r`,j such that no jobs of τh or τ` released on Pp beforet0 are pending; a released job is pending if it has not yetcompleted execution. (t0 is well-defined because the statedcondition holds at time 0.) Define tc , d`,j + ∆`. The as-sumption we seek to contradict is that τ`,j does not com-plete by tc. Since τ`,j fails to complete by tc, there are morethan tc − t0 units of demand in the interval [t0, tc) for theexecution of jobs on Pp with priority at least that of τ`,j .

Demand from τh. By Lem. 1, the competing demand in[t0, tc) due to τh on Pp is at most

(sh,p)(tc − t0) + (sh,p)(∆h + Th) + 2Ch. (5)

Demand from τ`. Additional demand can come from jobsof τ` with deadlines earlier than d`,j . By the definition oft0, all such jobs are released in [t0, r`,j). Thus, there are at

most⌊

(r`,j−t0)T`

⌋such jobs. Including job τ`,j itself, there

are at most⌊

(r`,j−t0)T`

⌋+ 1 jobs of τ` released in [t0, tc)

with deadlines at most d`,j . The total demand due to such

jobs is(⌊

(r`,j−t0)T`

⌋+ 1)C`, which by the definition of U`

is at most(U`)(r`,j − t0) + C`. (6)

Total demand. For notational convenience, let

K , (sh,p)(∆h + Th) + 2Ch + C`. (7)

Then, by (5) and (6), the total demand on Pp due to jobs ofequal or higher priority than τ`,j in [t0, tc) is at most

K + (tc − t0)sh,p + (r`,j − t0)U`. (8)

Because τ`,j completed after time tc (by assumption),the considered demand exceeds the length of the interval[t0, tc), so

(tc − t0) < {By (8)}K + (tc − t0)sh,p + (r`,j − t0)U`

= {Rearranging}K + (tc − r`,j)sh,p + (r`,j − t0)(sh,p + U`)

< {By Prop. 5}K + (tc − r`,j)sh,p + (r`,j − t0). (9)

Subtracting (r`,j − t0) from both sides of (9) gives (tc −r`,j) < K + (tc − r`,j)sh,p, which implies

K > (tc − r`,j)(1− sh,p). (10)

By Prop. 2, Uh < 1, and hence sh,p < 1. Thus, by (10),

(tc − r`,j) < {since 1− sh,p is positive}K

1− sh,p= {By (7)}

(sh,p)(∆h + Th) + 2Ch + C`1− sh,p

= {By (4)}∆` + T`.

Because r`,j = d`,j − T`, this implies tc − d`,j < ∆`,which contradicts our definition of tc = d`,j + ∆`. Thus, itcannot be the case that τ`,j completed after time d`,j + ∆`

as assumed.

4.2 Tardiness Bounds for Fixed Tasks

If no migrating tasks execute on a given processor, then thefixed tasks on that processor have zero tardiness, by the op-timality of EDF on one processor. The following theorem

Page 8: Optimal Semi-Partitioned Scheduling in Soft Real …anderson/papers/ecrts13a.pdf · optimal semi-partitioned scheduling), is based on EDF-fm. EDF-fm was designed with implicit-deadline

establishes tardiness bounds for fixed tasks that must exe-cute together with migrating tasks.

Theorem 2. Suppose that at least one migrating task exe-cutes on processor Pp and let τi be a fixed task on Pp. IfPp has two migrating tasks (refer to Prop. 3), denote themas τh and τ`, where τh has higher priority; otherwise, de-note its single migrating task as τh, and consider τ` to be a“null” task with T` = 1, s`,p = 0, and C` = 0. Then, τi hasa maximum tardiness of at most

∆i ,(sh,p)(∆h + Th) + 2Ch + (s`,p)(∆` + T`) + 2C`

(1− sh,p − s`,p).

(11)

Proof. This proof will be similar in structure to that ofThm. 1. We will upper bound demand over the followinginterval.

Interval [t0, tc). For purposes of contradiction, supposethat there exists a job τi,j of τi that has tardiness exceeding∆i, i.e., τi,j has not completed by tc, where tc , di,j + ∆i.Define a job as a competing job if it is released on Pp and itis a job of τh or τ`, or a job of a fixed task that has a dead-line at or before di,j . Let t0 be the latest point in time ator before ri,j such that no competing jobs released beforet0 are pending. (t0 is well-defined because the stated con-dition holds at time 0.) We now bound demand over [t0, tc)due to competing jobs (including τi,j itself) by consideringmigrating and fixed tasks separately.

Demand from migrating tasks. By Lem. 1, demand over[t0, tc) due to jobs of τh and τ` is at most

(sh,p)(tc − t0) + (sh,p)(∆h + Th) + 2Ch+(s`,p)(tc − t0) + (s`,p)(∆` + T`) + 2C`. (12)

Demand from fixed tasks. A fixed task τk can release atmost

⌊di,j−t0Tk

⌋competing jobs within [t0, tc). Thus, de-

mand from all competing jobs of fixed tasks is at most∑τk∈τfp

⌊di,j − t0Tk

⌋Ck ≤ (di,j − t0)

∑τk∈τfp

CkTk. (13)

By the definition of σfp , (13) can be rewritten as

(di,j − t0)(σfp ) ≤ {By Prop. 4}(di,j − t0)(1− sh,p − s`,p). (14)

Total demand. For notational convenience, let

K , (sh,p)(∆h+Th)+2Ch+(s`,p)(∆`+T`)+2C`. (15)

Then, by (12) and (14), total competing demand is at most

K + sh,p(tc − t0) + s`,p(tc − t0)+(di,j − t0)(1− sh,p − s`,p). (16)

Because τi,j completed after time tc (by assumption),the considered demand exceeds the length of the interval[t0, tc), so

(tc − t0) < {By (16)}K + sh,p(tc − t0) + s`,p(tc − t0)+(di,j − t0)− (di,j − t0)(sh,p + s`,p)

= {Rearranging}K + (sh,p + s`,p)(tc − t0)+(di,j − t0)− (di,j − t0)(sh,p + s`,p). (17)

Subtracting (di,j − t0) from both sides of (17), we have(tc−di,j) < K+(sh,p+s`,p)(tc− t0)− (di,j− t0)(sh,p+s`,p) = K + (sh,p + s`,p)(tc − di,j). This implies

K > (tc − di,j)(1− sh,p − s`,p). (18)

By Prop. 4 and because at least one fixed task τi assigned toPk, we have (1− sh,p − s`,p) > 0. Thus, by (18),

tc − di,j <K

(1− sh,p − s`,p)= {By (11) and (15)}

∆i.

This contradicts our definition of tc = di,j+∆i, so it cannotbe the case that τi,j has more than ∆i units of tardiness.

5 DiscussionIn this section, we discuss several issues motivated by ouranalysis as well as extensions to our results.

Refined assignment procedures. Our analysis suggeststhat, by refining EDF-os’s assignment procedure, it maypossible to obtain lower tardiness bounds. First, note thatthe inductive nature of the tardiness bound calculation formigrating tasks may cause migrating tasks assigned to laterprocessors to have higher bounds because tardiness can cas-cade (though it will remain bounded). It may be possible toreduce such cascades by adjusting the assignment of migrat-ing tasks, particularly on systems that are not fully utilized.Second, note that reducing the shares of migrating tasks ex-ecuting on Pp reduces the bounds in (4) and (11). How-ever, such a reduction would entail increasing the shares ofthese tasks on other processors, which could lead to tardi-ness bound increases on those processors. It may be pos-sible to take such linkages among processors into accountand obtain an assignment of tasks to processors that lessensthe largest tardiness bound in the system. Finally, note that(4) includes −T` as part of τ`’s tardiness bound. By biasingthe task assignment procedure to prefer larger periods formigrating tasks, it might be possible to lessen the tardinessbounds that result. We leave refinements to our assignmentprocedure motivated by these observations as future work.

Bounds with non-implicit deadlines. We have so far as-sumed that all job deadlines are implicit. However, if we

Page 9: Optimal Semi-Partitioned Scheduling in Soft Real …anderson/papers/ecrts13a.pdf · optimal semi-partitioned scheduling), is based on EDF-fm. EDF-fm was designed with implicit-deadline

maintain the prioritizations that EDF-os uses, then boundedtardiness can be easily ensured for systems with non-implicit deadlines, i.e., ones where each task τi has a spec-ified relative Di that may be less than, equal to, or greaterthan Ti. Maintaining the existing prioritizations for migrat-ing tasks is straightforward, as these tasks are not scheduledby deadline (that are statically prioritized). For each job τi,jof a fixed task τi, we merely need to define a “schedulingdeadline” equal to ri,j + Ti and prioritize such jobs on anEDF basis using scheduling deadlines instead of real ones.With this change, EDF-os will behave as before, but ouranalysis then bounds tardiness (for both migrating and fixedtasks) with respect to scheduling deadlines. However, theycan be easily corrected to be expressed with respect to realdeadlines: ifDi > Ti, then simply subtractDi−Ti from thebound; if Di < Ti, then simply add Ti −Di to the bound.

Window constrained second-level schedulers In definingEDF-os, we used EDF as a secondary scheduler for fixedtasks. (For migrating tasks, our prioritization rules and thesporadic task model fully characterize the behavior.)

Optimal variants of EDF-os can be constructed in whichother algorithms are used as the secondary scheduler. Allthat we require is that a window-constrained [22] sched-uler be used. Such a scheduler employs a per-task prior-ity function χi(τi,j , t) such that for some constants φi andψi, ri,j − φi ≤ χi(τi,j , t) ≤ di,j + ψi for each job τi,j .The priority of job τi,j is at least that of τi′,j′ at time t ifχi(τi,j , t) ≤ χi′(τi′,j′ , t) (priority functions can potentiallychange with time).

Our analysis can be modified to deal with this more gen-eral priority specification as follows. The bounds for migrat-ing tasks continue to hold without modification; the proof ofThm. 1 is unchanged. By the definition of EDF-os priori-ties, all jobs of τh always have a higher priority than τ`,j ,and by the sporadic task model, no job of τ` released afterr`,j is eligible for execution before τ`,j completes.

However, in our analysis of the tardiness of fixed tasksin the proof of Theorem 2, the number of competingjobs due to a fixed task τk is no longer

⌊di,j−t0Tk

⌋but⌊

di,j+ψi+φk−t0Tk

⌋. In effect, this change causes “di,j” to be

replaced by “di,j+ψi” throughout the proof andK to be in-flated by an additional

∑τk∈τfp Ukφk. As a result, ∆i must

be increased by ψi +Pτk∈τ

fpUkφk

1−sh,p−s`,p . Tighter analysis may bepossible if more is known about the prioritization function(as was the case with EDF).

Non-preemptivity. After designing EDF-os, we initiallythought it retained its optimality if job execution is non-preemptive. However, this turns out not to be the case.In particular, with non-preemptivity, a job of a migrat-ing task executing on a non-first processor for that taskmay be non-preemptively blocked when it is released.This blocking negates an important property exploitedin our analysis, namely that such jobs execute immedi-ately upon release. In an online appendix (available athttp://www.cs.unc.edu/∼anderson/papers.html), we give a

counterexample consisting of five tasks executing on threeprocessors where such non-preemptive blocking causes amigrating task to have unbounded tardiness.

6 Experimental ComparisonTo assess the improvement of EDF-os over EDF-fm, weconducted experiments in which the two algorithms werecompared both on the basis of schedulability and the tardi-ness bounds ensured by each. Due to space constraints, weonly discuss the tardiness bound experiments here. It is self-evident that EDF-os is preferable with respect to schedula-bility, as it is optimal and EDF-fm is not.

In our tardiness bound experiments, we randomly gen-erated task sets and computed for each task set the max-imum tardiness bound under each of EDF-os and EDF-fm. Our parameter distributions for the generated task setswere based on prior studies, e.g., [12]. However, in orderto be certain that any generated task set was schedulableby EDF-fm, we restricted the utilization of each task to beat most 0.5. We used both uniform and bimodal utilizationdistributions. For uniform distributions, we considered alight distribution where values were drawn from [0.001, 0.1]and a medium distribution where they were drawn from[0.1, 0.4]. (We did not test a heavy distribution to avoid cre-ating utilizations exceeding 0.5.) For bimodal distributions,we drew values uniformly in the range of either [0.001, 0.1]or [0.25, 0.499] with respective probabilities of 8

9 and 19 , 6

9

and 39 , and 4

9 and 59 , for light, medium, and heavy distri-

butions, respectively. We generated periods uniformly fromeither a short (3 ms to 33 ms), medium (10 ms to 100 ms),or long (50 ms to 250 ms) distribution.

For each combination of period and utilization distribu-tion, we generated 100,000 task sets and computed the max-imum tardiness bound of each task set under each of EDF-fm and EDF-os. When generating each task set, we addedtasks until the task set became infeasible on eight proces-sors, and then removed the last task.

Fig. 12 shows the percent mean reduction in the maxi-mum tardiness bound for each experiment. Across all tests,EDF-os achieved an average tardiness reduction of 84%over EDF-fm. Therefore, it is a substantial improvementover EDF-fm even for systems that EDF-fm can schedule.One major reason for this improvement is that EDF-os canoften generate a schedule with no migrating tasks (due to itsbin-packing heuristic), resulting in no tardiness for any task.Although (unlike EDF-fm) EDF-os allows migrating tasksto be tardy, the first migrating task will have no tardiness,and there are few migrating tasks to “cascade” tardiness.

7 ConclusionWe have presented EDF-os, the first boundary-limitedsemi-partitioned scheduling algorithm that is optimal underthe “bounded tardiness” definition of SRT correctness. Wehave also discussed optimal variants of EDF-os in whichimplicit deadlines are not assumed and in which algorithmsother than EDF are used as the secondary scheduler. EDF-os and its analysis extend prior work on EDF-fm by intro-

Page 10: Optimal Semi-Partitioned Scheduling in Soft Real …anderson/papers/ecrts13a.pdf · optimal semi-partitioned scheduling), is based on EDF-fm. EDF-fm was designed with implicit-deadline

Figure 12: Percent tardiness reduction of EDF-os over EDF-fm.

ducing two new key ideas: using some static prioritizationsto make the execution of migrating tasks more predictable;and exploiting properties of worst-fit decreasing task assign-ments to enable a migrating task to be analyzed by “pre-tending” that all of its jobs execute on its first processor. Inexperiments that we conducted, EDF-os proved to be bet-ter than EDF-fm not only with respect to schedulability, butalso tardiness bounds that can be guaranteed.

The only other optimal boundary-limited scheduling al-gorithms for SRT systems known to us are non-preemptiveglobal EDF (NP-G-EDF) [10] and global FIFO (G-FIFO) [21] (which is also non-preemptive). For static sys-tems, EDF-os is likely to be preferable in practice, be-cause the tardiness bounds we have established are lowerthan those known for NP-G-EDF and G-FIFO, and be-cause semi-partitioned algorithms have lower runtime over-heads than global ones [5]. On the other hand, for dynamicsystems, where task timing parameters (such as executionbudgets and periods) may change at runtime, NP-G-EDFis likely to be preferable, as EDF-based global schedulingtends to more amenable to runtime changes [9]. In contrast,the correctness of EDF-os relies crucially on how tasks areassigned to processors, and redefining such assignments on-the-fly does not seem easy.

In future work, we would like to implement EDF-os andconduct experiments in which it is compared to other alter-natives on the basis of schedulability with measured over-heads considered. We would also like to determine condi-tions under which bounded tardiness can be ensured underEDF-os if non-preemptive code regions exist or if lockingprotocols are used to access shared resources.

References[1] J. Anderson, V. Bud, and U. Devi. An EDF-based restricted-

migration scheduling algorithm for multiprocessor soft real-time sys-tems. Real-Time Sys., 38(2):85–131, 2008.

[2] B. Andersson, K. Bletsas, and S. Baruah. Scheduling arbitrary-deadline sporadic task systems on multiprocessors. In Proc. of the29th IEEE Real-Time Sys. Symp., pages 385–394, 2008.

[3] B. Andersson and E. Tovar. Multiprocessor scheduling with few pre-emptions. In Proc. of the 12th IEEE Int’l Conf. on Embedded andReal-Time Computing Sys. and Applications, pages 322–334, 2006.

[4] S. Baruah, N. Cohen, C.G. Plaxton, and D. Varvel. Proportionateprogress: A notion of fairness in resource allocation. Algorithmica,15(6):600–625, 1996.

[5] A. Bastoni. Towards the Integration of Theory and Practice in Mul-

tiprocessor Real-Time Scheduling. PhD thesis, University of Rome‘Tor Vergata’, Rome, Italy, 2011.

[6] M. Bhatti, C. Belleudy, and M. Auguin. A semi-partitioned real-time scheduling approach for periodic task systems on multicore plat-forms. In Proc. of the 27th Annual ACM Symp. on Applied Comput-ing, pages 1594–1601, 2012.

[7] K. Bletsas and B. Andersson. Notional processors: an approach formultiprocessor scheduling. In Proc. of the 15th IEEE Real-Time andEmbedded Technology and Applications Symp., pages 3–12, 2009.

[8] K. Bletsas and B. Andersson. Preemption-light multiprocessorscheduling of sporadic tasks with high utilisation bound. Real-TimeSys., 47(4):319–355, 2011.

[9] A. Block. Multiprocessor Adaptive Real-Time Systems. PhD thesis,University of North Carolina, Chapel Hill, NC, 2008.

[10] U. Devi and J. Anderson. Tardiness bounds for global EDF schedul-ing on a multiprocessor. Real-Time Sys., 38(2):133–189, 2008.

[11] F. Dorin, P. Yomsi, J. Goossens, and P. Richard. Semi-partitionedhard real-time scheduling with restricted migrations upon identi-cal multiprocessor platforms. Cornell University Library Archives,arXiv:1006.2637 [cs.OS], 2010.

[12] J.P. Erickson and J.H. Anderson. Fair lateness scheduling: Reduc-ing maximum lateness in g-edf-like scheduling. In Real-Time Sys.(ECRTS), 2012 24th Euromicro Conf. on, pages 3–12, 2012.

[13] M. Fan and G. Quan. Harmonic semi-partitioned scheduling forfixed-priority real-time tasks on multi-core platform. In Proc. of theDesign, Automation & Test in Europe Conf. & Exhibition (DATE),pages 503–508, 2012.

[14] J. Goossens, P. Richard, M. Lindstrom, I. Lupu, and F. Ridouard.Job partitioning strategies for multiprocessor scheduling of real-timeperiodic tasks with restricted migrations. In Proc. of the 20th Int’lConf. on Real-Time and Network Sys., pages 141–150, 2012.

[15] N. Guan, M. Stigge, W. Yi, and G. Yu. Fixed-priority multiprocessorscheduling: Beyond Liu & Layland utilization bound. In Proc. of the31st Real-Time Sys. Symp. Work in Progress Session, 2010.

[16] N. Guan, M. Stigge, W. Yi, and G. Yu. Fixed-priority multiprocessorscheduling with Liu and Layland’s utilization bound. In Proc. of the16th IEEE Real-Time and Embedded Technology and ApplicationsSymp., pages 165–174, 2010.

[17] S. Kato and N. Yamasaki. Real-time scheduling with task splittingon multiprocessors. In Proc. of the 13th IEEE Int’l Conf. on Em-bedded and Real-Time Computing Sys. and Applications, pages 441–450, 2007.

[18] S. Kato and N. Yamasaki. Portioned edf-based scheduling on multi-processors. In Proc. of the 8th ACM Int’l Conf. on Embedded soft-ware, pages 139–148, 2008.

[19] S. Kato and N. Yamasaki. Semi-partitioning technique for multipro-cessor real-time scheduling. In Proc. of the 29th IEEE Real-Time Sys.Symp. Work in Progress Session, 2008.

[20] S. Kato and N. Yamasaki. Semi-partitioned fixed-priority schedul-ing on multiprocessors. In Proc. of the 15th IEEE Real-Time andEmbedded Technology and Applications Symp., pages 23–32, 2009.

[21] H. Leontyev and J. Anderson. Tardiness bounds for FIFO schedulingon multiprocessors. In Proc. of the 19th Euromicro Conf. on Real-Time Sys., pages 71–80, 2007.

[22] H. Leontyev and J.H. Anderson. Generalized tardiness boundsfor global multiprocessor scheduling. Real-Time Sys., 44(1):26–71,2010.

[23] C. Liu and J. Layland. Scheduling algorithms for multiprogrammingin a hard-real-time environment. Journal of the ACM, 20(1):46–61,1973.

[24] A. Mok. Fundamental Design Problems of Distributed Systems forHard Real-Time Environments. Cambridge, Mass., 1983.

[25] P. Regnier, G. Lima, E. Massa, G. Levin, and S. Brandt. Run: Optimalmultiprocessor real-time scheduling via reduction to uniprocessor. InProc. of the 32nd IEEE Real-Time Sys. Symp., pages 104–115, 2011.

[26] A. Sarkar, PP Chakrabarti, and S. Ghose. Partition oriented framebased fair scheduler. Journal of Parallel and Distributed Computing,70(7):707–718, 2010.