new schedulability tests for real- time task sets scheduled by deadline monotonic on multiprocessors...

28
New Schedulability Tests for Real-Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola S.Anna, Pisa, Italy

Upload: julian-washington

Post on 26-Dec-2015

221 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola

New Schedulability Tests for Real-Time task sets scheduled by Deadline Monotonic on Multiprocessors

Marko Bertogna, Michele Cirinei, Giuseppe Lipari

Scuola S.Anna, Pisa, Italy

Page 2: New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola

Overview

Real-time multiprocessing Deadline-Monotonic (DM) for

multiprocessors Existing schedulability tests for RM/DM An improved test for DM Existing schedulability bounds Improving the bound for fixed priority

global scheduling

Page 3: New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola

Real-time scheduling for multiprocessor platforms Platform: identical, uniform or

heterogeneous Migration and priorities:

MIGRATIONPRIORITY

Full At job boundaries

Not allowed (partitioning)

Static RM-global, DM-global, …

RM-global, DM-global, …

RM-FFDU, DM-WFIU, …

Job-level dynamic

EDF-global, fpEDF, …

EDF, fpEDF, … EDF-FFDU, EDF-WFIU…

Unrestricted dynamic

pfair algorithms, LLF, …

not useful not useful

Page 4: New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola

Multiprocessor DM

CPU1

CPU2

CPU3

Global queue(ordered by relative deadline)

The first m tasks are scheduled upon the m CPUs

Page 5: New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola

Multiprocessor DM

CPU1

CPU2

CPU3

Global queue(ordered by relative deadline)

When a task finishes its execution, the next one in the queue is scheduled on the available CPU

Page 6: New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola

Multiprocessor DM

CPU1

CPU2

CPU3

Global queue(ordered by relative deadline)

When a higher priority task arrives, it preempts the task with highest deadline among the executing tasks

Page 7: New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola

Multiprocessor DM

CPU1

CPU2

CPU3

Global queue(ordered by relative deadline)

When another task ends its execution, the preempted task can resume its execution

Task “migrated” from

CPU3 to CPU1

Page 8: New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola

Why fixed priority global scheduling?

Advantages: Load balancing Number of preemptions Simple implementation Easy rescheduling Reclaiming

Disadvantages: Cache affinity: HW mitigates migration cost Utilization bound lower than pfair algorithms

Page 9: New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola

RM for uniprocessor systems

Optimality among fixed priority systems

Bounded number of preemptions

Efficient implementations

Easy sufficient schedulability test:

Page 10: New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola

RM uniprocessor: necessary and sufficient test

Response Time Analysis: Repeat:

Until: Pseudopolynomial complexity

Page 11: New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola

RM on multiprocessors

Low utilization bound (Dhall’s effect) Bounded number of preemptions/migrations

Good performances on average Schedulability tests (sufficient conditions):

Andersson, Baruah, Jonsson (2002) ABJ test

Baker (2003) BAK test

Efficient implementations

Page 12: New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola

T

Dhall’s effect

Example: m processors, n=m+1 tasks, Di = Ti

1 ,…, m = (1,T-1) m+1 = (T,T)

RM can fail at very low utilizations

DEADLINEMISS

Page 13: New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola

The ABJ test

For implicit deadline systems (Di = Ti) using RM

Linear complexityA task set is schedulable with RM on a platform with m identical processors if:

1.

2.

Total utilization

Page 14: New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola

The BAK test

For constrained deadline systems (Di

Ti) Quadratic complexity

A task set is schedulable with EDF on a platform with m identical processors if:

i = f(i ,k) k = Ck /Dk

Page 15: New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola

Toward a better schedulability test for RM/DM

Improve BAK when heavy tasks are considered

Extend the ABJ test: for arbitrary task utilizations for constrained deadline systems

Page 16: New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola

Can BAK be improved?

Ik > (Dk-Ck)

k

k

k

DEADLINEMISS

CPU1CPU2CPU3

rkrk+Dk

Ik = Total interference suffered by task k

I2,k

I1,kI2,k

I3,kI4,k

I5,k

I6,k

I8,k

I5,k

I3,k

I7,k

I3,k

Ii,k = Interference of task i on task k

Page 17: New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola

The BCL test

Ii,k > m(Dk-Ck)

k

k

k

DEADLINEMISS

CPU1CPU2CPU3

rkrk+Dk

I2,k

I1,kI2,k

I3,kI4,k

I5,k

I6,k

I8,k

I5,k

I3,k

I7,k

I3,k

IDEA: It is sufficient to consider at most the portion Dk-Ck of each term Ii,k in the sum

for all i,k: Ii,k ≤ Ik

Page 18: New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola

The BCL test for DM

A task set is schedulable with DM on m processors if and only if, for every task k :

Computing each Ii,k requires exponential time

To reduce the complexity: bound the interference with the load give an upper bound on the load

Derive a sufficient condition to be checked for every task

Page 19: New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola

The BCL test for DM

i = f(i ,Dk) k = Ck /Dk

Complexity is O(n2)

A task set is schedulable with DM on m processors if, for every task k :

Page 20: New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola

Can ABJ be improved?

New analysis for constrained deadline systems and priorities according to DM

Improvement over ABJ: Preperiod deadline systems Arbitrary individual task utilization Higher global utilization Introduce to a better schedulability bound

for the fixed priority global scheduling class of algorithms

Page 21: New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola

Density and utilization based test for RM/DM

A task set with constrained deadlines is schedulable with DM on m ≥ 2 identical processors if:

A task set with implicit deadlines is schedulable with RM on m ≥ 2 identical processors if:

Page 22: New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola

Improvement over existing bounds

Bound more general than ABJ: taking we have

as ABJ.

Corrected (and extended) Baker’s bound [RTSS’03]

Page 23: New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola

Existing schedulability bounds for SMPs

M=number of processorsU=worst-case total utilization

[Carpenter, Funk, Holman, Srinivasan, Anderson, Baruah]

Page 24: New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola

Hybrid algorithms

Treat differently heavy and light tasks Allow to overcome Dhall’s effect

ALGORITHM RM-US[Uth]- if (Ui>Uth) task has maximum priority- else task has priority according to RM

ALGORITHM DM-DS[λth]- if (λi>λth) task has maximum priority- else task has priority according to DM

Page 25: New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola

RM-US[1/3] and DM-DS[1/3]

A task set with constrained deadlines is schedulable with DM-DS[1/3] on m ≥ 2 identical processors if:

A task set with implicit deadlines is schedulable with RM-US[1/3] on m ≥ 2 identical processors if:

Page 26: New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola

Existing schedulability bounds for SMPs

M=number of processorsU=worst-case total utilization

[Carpenter, Funk, Holman, Srinivasan, Anderson, Baruah]

Page 27: New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola

Conclusions

Extended BAK test for DM: BCL test that better behaves with heavy tasks

Improved ABJ test: generalized to constrained deadline systems extended to arbitrary task utilizations/densities increased the schedulability bound for RM/DM

Proposed hybrid algorithms (RM-US, DM-DS): improved the schedulability bound of the fixed

priority global scheduling class of algorithms