μ΄κ² κ°λ₯νλλ‘ ν΄μ€ Marpμκ² λ¬΄νν κ°μ¬λ₯Ό!
1. Introduction
- In this paper,
the problem of preemptively scheduling a real-time task set
on a symmetric multiprocessor (SMP) system consisting of m processors is addressed.
- Can be solved in two different ways
- by partitioning tasks to processors
- with a global scheduler
Semi-partitioned scheduling
: limits the number of processors among which a task can migrate
Pfair scheduling
: at each quantum the scheduler allocates tasks to processors.
- Known to be optimal when deadlines = periods
- Disadvantages: quantum synchronize, context switching overhead, complex
job-level dynamic
1.1 Contribution
General conditions
that are valid for any work-conserving scheduling algorithm and constrained deadline task sets
- Fixed Priority (FP)
- The Earliest Deadline First (EDF).
The main weak points
of feasibility tests and further refinement on the computation of the interference a task can be subject to.
- Finally, an extensive set of synthetic experiments is presented to show the
improved performances of our analysis
.
2. System Model
Symbols
- A task Οkβ is a sequence of jobs Jkjβ
- Jkjβ(rkjβ,dkjβ,ckjβ,fkjβ): arrival time, deadline, computation time, finishing time
- Οkβ=(Ckβ,Dkβ,Tkβ)βΟ
- Ckβ: worst-case computation time, Ckββ₯ckjβ
- Dkβ: relative deadline, dkjβ=rkjβ+Dkβ
- Tkβ: minimum interarrival time, rkjββ₯rk(jβ1)β+Tkβ
- constrained deadline (implicit deadline): Dkββ€Tkβ (Dkβ=Tkβ)
- utilization: Ukβ=TkβCkββ, density("worst-case" request): Ξ»kβ=DkβCkββ
- Umaxβ=maxkβUkβ, Ξ»maxβ=maxkβΞ»kβ, Utotβ=ΟkββΟββUkβ, Ξ»totβ=ΟkββΟββΞ»kβ
Notation
- (x)0β=max(0,x)
Definition
Work-conserving
: A scheduling algorithm is work-conserving if there are no idle processors when a ready task is waiting for execution.
2.1 Workload and Interference
Workload
Wkβ(a,b) : the amount of time task Οkβ executes during interval [a,b)
Interference
Ikβ(a,b) : the cumulative length of all intervals in which Οkβ is ready to execute, but it cannot execute due to higher priority jobs
.
- Ii,kβ(a,b) : the cumulative length of all intervals in which Οkβ is ready to execute, and Οiβ is executing while Οkβ is not.
Ii,kβ(a,b)β€Ikβ(a,b),βi,k,a,b(1)
2.2 Time division
- Time-instants and interval lengths are
often modeled using real numbers
, in a real implemented system time is not infinitely divisible.
- The times of event occurrences and durations between them
cannot be determined more precisely than one tick
of the system clock.
- t (non-negative integer value) represents the entire interval [t,t+1)
3. Summary of existing results
Theorem 1.
A task set Ο composed by periodic and sporadic tasks with implicit deadlines
is EDF-schedulable upon a SMP composed by m processors with unitary capacity, if
Utotββ€m(1βUmaxβ)+Umaxβ(2)
When deadlines can differ from periods?
Theorem 2.
A set of jobs I that is feasible on some uniform multiprocessor platform Ο with cumulative computing capacity SΟβ, and in which the fastest processor has speed sΟβ<1, is schedulable with EDF on a SMP Ο composed by m processors with unit capacity, if
mβ₯1βsΟβSΟββsΟββ
- ith processor works for t time units β siβΓt execution units.
- Theorem 2 assumes an arbitrary collection of jobs.
- The next lemma states a feasibility result that instead applies to periodic and sporadic task sets.
Lemma 1
A task system Ο composed by periodic and sporadic tasks with constrained deadlines is feasible on a uniform multiprocessor platform Ο which has SΟβ=Ξ»totβ and sΟβ=Ξ»maxβ
Proof
- An arbitrary task set Ο with n tasks can always be scheduled on a uniform multiprocessor platform Ο composed by n processors, that for each task Οiβ has a corresponding processor with computing capacity siβ=DiβCiββ.
- This can be done with an algorithm that allocates each task to the associated processor.
- The sum of the computing capacities of all processors and the computing capacity of the fastest processor of the platform Ο are therefore equal to Ξ»totβ and Ξ»maxβ respectively. β
- By combining Lemma 1 with Theorem 2, it is possible to formulate a sufficient scheduling condition.
Theorem 3 GFB
A task set Ο composed by both periodic and sporadic tasks with constrained deadlines is EDF-schedulable upon a SMP composed by m processors with unitary capacity, if
Ξ»totββ€m(1βΞ»maxβ)+Ξ»maxβ.(3)
- If Ξ»maxβ is large, RHS of Equation (3) remains small.
- This is due to a
DHall's Effect
How to overcome DHall's Effect
- EDFk
- Assign the highest priority to the k the heaviest tasks.
- Schedule the remaining ones with EDF.
- Schedulability test : Apply
GFB
to a subsystem composed by the (nβk) EDF-scheduled tasks on (mβk) processors.
- EDF-US
- Assign the highest priority to the tasks having utilization larger than given threshold.
- Allows the utilization bound of 2m+1β when threshold of 21β used.
- Baker's idea is based on the consideration that if a job Jkjβ of a task Οkβ misses its deadline dkjβ.
- It means the load in
problem window
(an interval [rkjβ,dkjβ)) is at least m(1βΞ»kβ)+Ξ»kβ
- If it's possible to show for every Jkjβ, the schedulability is guaranteed.

Carry-in
- The interference of any task Οiβ on task Οkβ in interval [rkjβ,dkjβ) may include one job of Οiβ with arrival before rkjβ and deadline in [rkjβ,dkjβ).
- The contribution of this job to the interference is called
carry-in
.
Sufficient schedulability condition
- Enlarge [rkjβ,dkjβ) to [a,dkjβ) :
busy window
- the largest possible interval such that the load is still greater than m(1βΞ»kβ)+Ξ»kβ
- By deriving an upper bound on the load produced in the busy window, a sufficient schedulability condition is obtained.
Rate-monotonic & Deadline-monotonic Algorithm
- Previous works proved that an implicit deadline task set can be successfully scheduled on m processors if
the total utilization
is at most m2/(3mβ2) and every task has individual utilization
less than or equal to m/(3mβ2).
- Also showed RM-US[m/(3mβ2)] - that gives the highest priority to the tasks with utilization greater than m/(3mβ2) and schedules the other ones with RM - can also reach the utilization of m2/(3mβ2).
Theorem 4
A set of periodic or sporadic tasks with constrained deadlines is schedulable with Deadline Monotonic priority assignment on mβ₯2 processors if Ξ»totββ€2mβ(1βΞ»maxβ)+Ξ»maxβ
- A corollary of Theorem 4 is that using a hybrid version of deadline monotonic - called
DM-DS[1/3] that gives the highest priority to tasks with density higher than 1/3.
- It's possible to schedule every constrained deadline task set with Ξ»totββ€(m+1)/3
4. Scheduling analysis
To clarify the methodology, we briefly describe the main steps that will be followed to derive the schedulability test.
-
Start by assuming that a job Jkjβ of task Οkβ misses its deadline dkjβ
-
Based on this assumption, we give a schedulability condition that uses the interference Ikβ that the job must suffer in interval [rkjβ,dkjβ) for the deadline to be missed;
-
If we were able to precisely compute this interference in any interval, the schedulability test would simply consist in the condition derived at the preceding step, and it would be necessary and sufficient.
-
Therefore, we give an upper bound to the interference in the interval and derive a sufficient scheduling condition.
4.1 Interference time
Lemma 2
The interference that a task Οiβ causes on a task Οkβ in an interval [a,b) is never greater than the workload of the task in the same interval:
βi,k,a,bIi,kββ€Wiβ(a,b)β€bβa
Lemma 3
For a work-conserving scheduler, the following relation holds:
Ikβ(a,b)=mβiξ β=kβIi,kβ(a,b)β
Lemma 4
Ikβ(a,b)β₯xβiξ β=kββmin(Ii,kβ(a,b),x)β₯mx
Proof If
iξ β=kββmin(Ii,kβ(a,b),x)β₯mx, it follows that
Ikβ(a,b)β=iξ β=kββmIi,kβ(a,b)ββ₯iξ β=kββmmin(Ii,kβ(a,b),x)ββ₯mmxβ=xβ
Proof Only If
Let ΞΎ be the number of tasks for which Ikβ(a,b)β₯x.
If ΞΎ>m, then iξ β=kββmin(Ii,kβ(a,b),x)β₯ΞΎxβ₯mx.
Otherwise, (mβΞΎ)β₯0 and using Lemma 3 and Equation (1),
iξ β=kββmin(Ii,kβ(a,b),x)β=ΞΎx+i:Ii,kβ<xββIi,kβ(a,b)=ΞΎx+mIkβ(a,b)βi:Ii,kββ₯xββIi,kβ(a,b)β₯ΞΎx+mIkβ(a,b)βΞΎIkβ(a,b)=ΞΎx+(mβΞΎ)Ikβ(a,b)β₯ΞΎx+(mβΞΎ)x=mxβ
- It is clear that, for a job to meet its deadline, Ikβ(rkjβ,dkjβ)β€DkββCkβ.
- Let's define the worst-case inference for task Οkβ as:
IΛkβ=maxjβ(Ikβ(rkjβ,dkjβ))=Ikβ(rkjββ,dkjββ) where jβ is the job instance in which the total interference is maximal.
- To simplify the notation, also define:
IΛi,kβ=Ii,kβ(rkjββ,dkjββ)
Theorem 5
A task set Ο is schedulable on a multiprocessor composed by m identical processors iff for each task Οkβ
iξ β=kββmin(IΛi,kβ,DkββCkβ+1)<m(DkββCkβ+1)(4)
Proof If
If Equation (4) is valid, from Lemma 4 we have IΛkβ<(DkββCkβ+1).
Therefore, Jkjββ will be interfered for at most DkββCkβ time units. (integer time assumptions)
It means, every job of Οkβ will complete after at most Dkβ and Οkβ is schedulable.
Proof Only If
If βiξ β=kβmin(IΛi,kβ,DkββCkβ+1)β₯m(DkββCkβ+1), then
IΛkββ=mβiξ β=kβIΛi,kβββ₯mβiξ β=kβmin(IΛi,kβ,DkββCkβ+1)ββ₯mm(DkββCkβ+1)β=DkββCkβ+1β
Hence, Οkβ is not schedulable.
4.2 Workload
- Theorem 5 cannot be used to check if a task set is schedulable without knowing how to compute the interference terms IΛi,kββs.
- Unfortunately, we are not aware of any strategy that can be used to compute the worst-case interferences starting from given task parameters.
- To sidestep this problem, we will use an upper bound on the interference.
- An upper bound on the interference Ii,kβ is the workload Wiβ(rkjββ,dkjββ)
- An upper bound on the workload? -
Find densest possible packing of jobs!
To simplify the presentation,
- carry-in Ο΅kβ of Οkβ in an interval [a,b) : the amount of execution produced by a job of Οkβ having release time before a and deadline after a.
- carry-out zkβ of Οkβ in an interval [a,b) : the amount of execution produced by a job of Οkβ having release time in [a,b) and deadline after b.
There is at most one carry-in and one carry-out job.
We denote them, respectively, as JiΟ΅β and Jizβ
- Since a job Jkjβ can be executed only in [rkjβ,dkjβ) and for at most Ckβ time units,
- It is immediate to see that the depicted situation provides the highest possible amount of execution in interval [a,b).

-
The first job of Οiβ after the carry-in, is released at time a+Ciβ+TiββDiβ.
-
The next jobs released periodically every Tiβ time units.
-
Therefore, the number Niβ(L) of jobs of Οiβ that contribute with an entire WCET to the workload in an interval of length L is at most βTiβLβ(Ciβ+TiββDiβ)ββ+1. So,
Niβ(L)=βTiβL+DiββCiβ)ββ(5)
-
Continuously, the contribution of carried-out job can be bounded by min(Ciβ,L+DiββCiββNiβ(L)Tiβ)
-
Now we can find the upper bound of workload:
Wiβ(L)=Niβ(L)Ciβ+min(Ciβ,L+DiββCiββNiβ(L)Tiβ)(6)
Theorem 6
A task set Ο is schedulable with any work-conserving global scheduling policy on a multiprocessor platform composed by m identical processors if for each task ΟkββΟ
iξ β=kββmin(W(Dkβ),DkββCkβ+1)<m(DkββCkβ+1)(7)
Proof
Equation (6) is valid for any work-conserving scheduling algorithm.
Using Lemma 2, we then have
IΛi,kβ=Ii,kβ(rkjββ,rkjββ+Dkβ)β€Wiβ(rkjββ,rkjββ+Dkβ)β€W(Dkβ)
Apply Theorem 5, using W(Dkβ) as an upper bound for IΛi,kβ.
4.3 Schedulability test for EDF
- There is
no carried-out job
can interfere with task Οkβ.
- We can consider the situation in which the carried-out job Jizβ has its deadline at the end of the interval like Figure 3.

-
There are βTiβDkβββ jobs which contribute for an entire worst-case computation time.
-
Instead, the first job contributes for DkβββTiβDkβββTiβ when this term is lower than Ciβ.
-
We therefore obtain the following expression:
IΛi,kββ€βTiβDkβββCiβ+min(Ciβ,DkβββTiβDkβββTiβ)=Ji,kβ(8)
-
A schedulability test for EDF immediately follows
Theorem 7
A task set Ο is schedulable with global EDF on a multiprocessor platform composed by m identical processors if for each task ΟkββΟ
iξ β=kββmin(Ji,kβ,DkββCkβ+1)<m(DkββCkβ+1)(9)
4.4 Schedulability test for FP
- It is still possible to use the general bound given by Equation (6) that is valid for any work-conserving scheduling policy.
- The interference from tasks with lower priority is always null.
- The following theorem assumes tasks are ordered with decreasing priority.
Theorem 8
A task set Ο is schedulable with fixed priority on a multiprocessor platform composed by m identical processors if for each task ΟkββΟ
i<kββmin(W(Dkβ),DkββCkβ+1)<m(DkββCkβ+1)(10)
5. Considerations
We must consider only the fraction of the workload
that can actually interfere
with task Οkβ.
When no task misses its deadline, this fraction is bounded by DkββCkβ
Example
Consider a task set Ο composed by Ο1β=(1,1,1), Ο2β=(1,10,10), Ο3β=(1,10,10) and Ο4β=(1,10,10) to be scheduled with EDF on m=2 processors. (It's schedulable.)
- When the deadlines of Ο1β and Ο2β coincide, a job of Ο2β would need to be pushed forward for D2ββC2β=9 time-units to interfere with Ο1β.
- But the maximum interference that Ο2β is
I2ββ€mβiξ β=2βIi,2βββ€mβiξ β=2βWiβ(r2jββ,d2jββ)ββ€210+1+1β=6
6. Iterative test
The lower the interference, the highest is the distance between the job finishing time fkjβ and its deadline dkjβ.
- The slack Skjβ of job Jkjβ:Skjβ=dkjββfkjβ.
- The slack Skβ of task Οkβ:Skβ=minjβ(dkjββfkjβ)
When Skβ>0, the densest possible packing of jobs of Οkβ will produce a lower workload in the considered interval.
6.1 Iterative test for general scheduling algorithms
Theorem 9
The slack of a task Οkβ scheduled on a multiprocessor platform composed by m identical processors is given by
Skβ=DkββCkβββmβiξ β=kβmin(IΛi,kβ,DkββCkβ+1)ββ(11)
when Equation (11) is positive.
Proof
When the RHS of Equation (11) is positive, βmβiξ β=kβmin(IΛi,kβ,DkββCkβ+1)βββ€DkββCkβ.
Applying Lemma 4, we have IΛkβ<(DkββCkβ+1) and IΛi,kββ€IΛkβ<(DkββCkβ+1). Therefore,
min(IΛi,kβ,DkββCkβ+1)=IΛi,kβ(12)
Now, from the definition of slack,
Skββ=jminβ(dkjββfkjβ)=dkjβββfkjββ=(rkjββ+Dkβ)β(rkjββ+Ckβ+IΛkβ)=DkββCkββIΛkββ
Using Lemma 3 and Equation (12),
Skββ=DkββCkβββIΛkββ=DkββCkβββmβiξ β=kβIΛi,kβββ=DkββCkβββmβiξ β=kβmin(IΛi,kβ,DkββCkβ+1)βββ
Since we cannot compute IΛi,kβ in a reasonable amount of time, we will use the upper bound on IΛi,kβ.
-
We have Wiβ(Dkβ)β₯IΛi,kβ
-
A lower bound Sklbβ on the slack of a task Οkβ is then given by
Sklbβ=DkββCkβββmβiξ β=kβmin(Wiβ(Dkβ),DkββCkβ+1)ββ(13)
Now, it's possible to give a tighter upper bound on the interference Οiβ.
Every job of Οiβ will complete at least Sklbβ time-units before its deadline if Sklbβ is positive.
Let's override the expression of Wiβ(L) as follows:
Wiβ(L,Silbβ)=Niβ(L,Silbβ)Ciβ+min(Ciβ,L+DiββCiββSilbββNiβ(L,Silbβ)Tiβ)(14)
Niβ(L,Silbβ)=βTiβL+DiββCiββSilbβββ(15)
Theorem 10
A lower bound on the slack of a task Οkβ scheduled on a multiprocessor platform composed by m identical processors is given by
Sklbβ=DkββCkβββmβiξ β=kβmin(Wiβ(Dkβ,Silbβ),DkββCkβ+1)ββ(16)
when this term is positive.
Β
- For every task in the task set, a lower bound value on the slack of the task is created and initially set to zero.
- Equation (16) is then used to compute a new value of the slack lower bound of the first task, with Wiβ(D1β,Silbβ) and Niβ(D1β,Silbβ) given by Equation (14) and (15).
- If the computed value is positive, the upper bound is accordingly updated.
- If it is negative, the value is left to zero and the task is marked as
temporarily not schedulable
.
- The previous step is repeated for every task in the task set.
- If no task has been marked as temporarily not schedulable, the task set is declared
schedulable
.
- Otherwise, another round of slack updates is performed using the slack lower bounds derived at the previous cycle. If during a complete round no slack is updated, the iteration stops and the task set is declared
not schedulable
.


6.2 Iterative test for EDF
When a lower bound on the slack of Οiβ is known, the upper bound on IΛi,kβ given by Equation (8) can be tightened.

- The first job contributes for max(0,DkββSklbβββTiβDkββTiββ) when this term is lower than Ciβ.
- This leads to following expression:
IΛi,kββ€βTiβDkβββCiβ+min(Ciβ,(DkββSklbβββTiβDkβββTiβ)0β)=Ji,kβ(Sklbβ)(17)
Theorem 11
A lower bound on the slack of a task Οkβ scheduled with EDF on a multiprocessor platform composed by m identical processors is given by
Sklbβ=DkββCkβββ£β’β’β’β’βm1βiξ β=kββmin(Ji,kβ(Sklbβ),DkββCkβ+1)β¦β₯β₯β₯β₯β(18)
when this term is positive.
Β
Assuming tasks are ordered with decreasing priority, next theorem follows.
Theorem 12
A lower bound on the slack of a task Οkβ scheduled with fixed priority on a multiprocessor platform composed by m identical processors is given by
Sklbβ=DkββCkβββmβi<kβmin(Wiβ(Dkβ,Silbβ),DkββCkβ+1)ββ(19)
when this term is positive.
However, there is an important difference from the EDF and the general case.
- When a task is found temporarily not schedulable during the first iteration, the test can immediately stop and return a false value.
- It means, we can choose Nround_limit=1 when the scheduler is FP
7. Experimental Results
We will consider the following schedulability algorithms for each case.
EDF
- Theorem 3
GFB
, O(n3) test BAK
- Theorem 7
BCL EDF
- The iterative test when EDF is used.
I-BCL EDF
FP
- deadline monotonic
- Theorem 4
DB
, O(n3) test BC
- Theorem 8
BCL FP
- The iterative test when FP is used.
General
: BCL
, I-BCL


- Less than 1% of the generated task sets is found schedulable by an existing algorithm for
EDF
but not by I-BCL EDF
.
- I-BCL FP outperforms even FB.
8. Computational Complexity
-
Complexity of Theorems 6, 7, 8:
O(n2): Each test involves n inequalities with n terms per inequality.
-
Iterative Tests (Section 6):
Complexity depends on the number of slack updates.
Nround_limit=β:
- Single iteration: O(n2)
- Total iterations: O(nDmaxβ)
- Overall complexity: O(n3Dmaxβ)
With finite Nround_limit:
- O(n2Nround_limit)
Experimental Findings
Experiments with Nround_limitβ=1,2,3,β in EDF case:
- Nround_limit=1: Similar results to BCL EDF (Theorem 7).
- Nround_limit=2: Significant increase in detected task sets.
- Nround_limit=3: Detects almost all schedulable task sets as Nround_limit=β.
Optimal Trade-off:
- Nround_limit=3 balances computational efficiency and performance.
9. Conclusions
Key Contributions:
- Developed
schedulability analysis
for real-time systems globally scheduled on identical multiprocessor platforms.
- Proposed sufficient schedulability tests with
polynomial and pseudo-polynomial complexity
.
- Iterative test detects the highest number of schedulable task sets compared to existing tests, with
minimal missed sets
.
- Iterative tests
significantly increase
the number of detected schedulable task sets.
- Only a
small percentage
of task sets are schedulable by existing tests but not by the iterative test.
EDF Limitations:
- EDFβs superiority in uniprocessor systems
does not generalize to multiprocessors
.
- Fixed Priority (FP) schedulers provide similar schedulability with
lower implementation costs
.
Fixed Priority (FP):
I-BCL FP
detects the most schedulable task sets
among all existing FP-based algorithms.
- Combining simple FP schedulers with
I-BCL FP
ensures hard real-time constraints.