Title: Real-Time Systems
1Tardiness Bounds for Global Multiprocessor
Scheduling Algorithms Jim Anderson UNC
Chapel-Hill Joint work with Uma Devi and
Hennadiy Leontyev
2Context Real-Time on Multicore
- Most chip manufacturers are moving to multicore.
- Heat/energy issues are limiting clock speeds.
- Solution multiple cores per chip.
- A common architecture today
Core 1
Core M
- Symmetric cores.
- One thread per core.
L1
L1
L2
3Context Real-Time on Multicore
- Most chip manufacturers are moving to multicore.
- Heat/energy issues are limiting clock speeds.
- Solution multiple cores per chip.
- A common architecture today
- This is only the beginning!
- Tens (hundreds?) of cores per chip.
- Multiple (hardware) threads per core.
- Asymmetric platforms.
- Complex cache configurations.
Core 1
Core M
- Symmetric cores.
- One thread per core.
L1
L1
L2
4Some Research Issues
- How to deal with cache asymmetry?
- How to deal with processor asymmetry?
- How to mix real-time and non-real-time?
- How to manage energy?
- How to support adaptive behavior?
- How to design the operating system?
- Our Platform LITMUSRT (LInux Testbed for
MUltiprocessor Scheduling in Real-Time systems). - Can download from my webpage.
5Multiprocessor Scheduling
6Sporadic Task Model
m the number of processors
Task Ti is denoted Ti (ei,pi). Example Ti
(2,4)
? ei
? ei
? ei
Ti,2
Ti,2
time
Ti,1
Ti,3
0
pi
? pi
pi
pi
7Soft Real-Time Systems
- Schedule tasks such that tardiness of any job is
bounded. - Tardiness Amount by which a deadline is missed.
EDF schedule on 2 procs.
T1 e12 p13
T1
T2,1
T2 e22 p23
T1,1
T3 e32 p33
T2
T2,1
T2,2
T3
T3,1
T3,2
job release
job deadline
8Two Tardiness Theorems
Assuming U m
Theorem (Devi and Anderson 2005) Tardiness under
global EDF (GEDF) is bounded.
Theorem (Leontyev and Anderson 2007)
Tardiness under any window-constrained global
algorithm is bounded.
9Some Well-Studied Scheduling Schemes
Scheduling Policy Task Ordering
Global EDF d(Ti,j) lt d(Tk,h)
Global FIFO r(Ti,j) lt r(Tk,h)
LLF slack(Ti,j,t) lt slack(Tk,h,t)
EDZL EDF unless zero slack
10General Prioritization Function
- Job Ti,js priority is given by
- Priority order
- Can model existing schemes (e.g., GEDF, FIFO,
etc.). - Can also combine schemes (e.g., GEDFFIFO).
11Example Global FIFO
Task set T1(1,3), T2(2,3),
T3(1,4), T4(3,4)
m2, U2
job deadline
job release
T1,4
T1,3
T1,2
T1
T1,1
T2,2
T2,1
T2,3
T2,4
T2
T3,1
T3,2
T3,3
T3
T4,1
T4,3
T4,2
T4
0 1 2 3 4 5 6 7
8 9 10 11 12
12Example GEDF Global FIFO
Task set T1(1,3), T2(2,3),
T3(1,4), T4(3,4)
m2, U2
job deadline
job release
T1,4
T1,3
T1,2
T1
T1,1
T2,2
T2,1
T2,3
T2,4
T2
T3,1
T3,2
T3,3
T3
T4,1
T4,3
T4,2
T4
0 1 2 3 4 5 6 7
8 9 10 11 12
13Laxity (Slack) and LLF Mapping
Deadline of Ti,j
Execution cost of Ti,j
The time Ti,j already executed before t
14Laxity (Slack) and LLF Mapping
t2
t3
t4
t6
t
t1
t5
15Laxity (Slack) and LLF Mapping
ei-d(Ti,j,t1)2
slack(Ti,j,t1)2
slack(Tk,h,t1)2
t2
t3
t4
t6
t
t1
t5
16Laxity (Slack) and LLF Mapping
ei-d(Ti,j,t1)2
slack(Ti,j,t1)2
slack(Tk,h,t1)2
t2
t3
t4
t6
t
t1
t5
17EDZL mapping
EDF prioritization
LLF prioritization
Original EDZL
Use EDF, give highest priority if slack becomes 0.
slack(Ti,j,t)
t2
t3
t4
t6
t
t1
t5
18EDZL mapping
EDF prioritization
LLF prioritization
Original EDZL
Use EDF, give highest priority if slack becomes 0.
slack(Ti,j,t1)
t2
t3
t4
t6
t
t1
t5
19EDZL mapping
EDF prioritization
LLF prioritization
Original EDZL
Use EDF, give highest priority if slack becomes 0.
slack(Ti,j,t2)0
slack(Tk,h,t2)
t2
t3
t4
t6
t
t1
t5
20EDZL mapping
EDF prioritization
LLF prioritization
Original EDZL
Use EDF, give highest priority if slack becomes 0.
Proposed EDZL (note does not require slack
to be non-negative)
21Window-Constrained Priorities
d(Ti,j)
r(Ti,j)fi
r(Ti,j)
d(Ti,j)?i
t
GEDF, FIFO, Pfair, EPDF, LLF, EDZL are indeed
window-constrained.
If either inequality is violated, then there
exists a scheme with unbounded deadline
tardiness.
22Example, not Window-Constrained Global RM
Task set T1(1,3), T2(2,3),
T3(1,4), T4(3,4)
m2, U2
job deadline
job release
T1,4
T1,3
T1,2
T1
T1,1
T2,2
T2,1
T2,3
T2,4
T2
T3,1
T3,2
T3,3
T3
T4,1
T4,2
T4,1
T4,1
T4,2
T4
0 1 2 3 4 5 6 7
8 9 10 11 12
23Proof Outline
Proposed by Devi for GEDF.
Goal For any Ti, tardiness of any job xei.
- Consider an arbitrary job Ti,j with deadline at
di,jtd. - Assume that all jobs Tk,l with deadlines lt td
have tardiness at most xek. - Prove that the tardiness of Ti,j is at most xei.
24Induction Step
What factors affect tardiness of Ti,j?
Ti,j
Ti,j
0
d(Ti,j)td
25Induction Step
What factors affect tardiness of Ti,j?
Remaining work from jobs with earlier deadlines.
By the induction hypothesis, we do not need to
know exactly what happens in this part of the
schedule.
Ti,j
Ti,j
0
d(Ti,j)td
26Induction Step
What factors affect tardiness of Ti,j?
Potential competing demand from jobs with later
deadlines.
Remaining work from jobs with earlier deadlines.
Because priorities are window-constrained, we can
bound this demand.
Ti,j
Ti,j
0
d(Ti,j)td
27Some Research Questions
- Is this really soft real-time?
- We assumed worst-case execution costs.
- Would probably use average-case costs in a SRT
system. - ? overload can occur.
- ? two kinds of tardiness intrinsic and
overload-driven. - How to deal with overloads? Utilities?
- With average-case costs, can we derive expected
tardiness bounds?
28Some Research Questions
- Can we do interesting things by moving priority
points around? - Yes In a new paper, we show how to improve cache
performance by doing this. - Other uses?
- Is it possible to enforce different tardiness
bounds for different classes of tasks? - What happens if tasks self-suspend (e.g., for
I/O)?
29Some Research Questions
- What about other task models?
- E.g., multi-frame, models that allow precedence
constraints, etc.
30Thanks!