An Integrated Framework for Staffing and Shift Scheduling ...
Real- Time Scheduling II : Compositional Scheduling Framework
description
Transcript of Real- Time Scheduling II : Compositional Scheduling Framework
Real-Time Scheduling II:Compositional Scheduling Framework
Insik ShinDept. of Computer Science
KAIST
Timing Composition What is a problem?
How to compose two or more timing properties into a single timing property
T1 T2 T3
Timing Composition What is a problem?
How to compose two or more timing properties into a sin-gle timing property
How useful is it? It serves as a basis for the design and analysis of compo-
nent-based real-time systems i.e., for real-time component interfaces that abstract the collec-
tive timing requirements of individual workloads within compo-nents
T1 T2 T3
Hierarchical Scheduling
4
CPU
TaskTask
Scheduler
S
TaskTask
SApplication 1(component)
Application 2(component)
EDF
RM EDF
Hierarchical Scheduling - Issues
5
System-level scheduler’s viewpoint
CPU
TaskTask
Scheduler
S
TaskTask
S
What is the real-time requirements of each applica-
tion ?
Application 1 Application 2
Hierarchical Scheduling - Issues
6
CPU
Application-level scheduler’s view-point
Scheduler
TaskTask
S
TaskTask
S
CPU ShareReal-time guaran-tees from CPU
supply?
How can we achieve schedu-lability analysis with this CPU
share?
Proposed Framework - Overview
7
Interface-based hierarchical scheduling framework
CPUScheduler
TaskTask
S
TaskTask
Sinter-face
inter-face
8
Proposed Framework - Approaches Interface-based hierarchical scheduling
framework Approach
Propose a new real-time resource model (periodic) Extend real-time scheduling theories with the new
resource model Develop interfaces with these results Use interfaces for component-based schedulabililty
analysis
9
Proposed Framework - Assumptions Tasks
periodic independent fully preemptable synchronously released
Uni-processor scheduling Scheduling algorithms : EDF / RM
scheduler
task
re-source
task
11
Real-Time Resource Modeling Real-time virtual resource model
Characterize the timing property of re-source allocations provided to a sin-gle task (application/component)
Previous approaches rate-based resource model
Our approach temporally partitioned resource model task
2task
1
scheduler
re-source
Resource Modeling Dedicated resource
available at all times at full capacity
Rate-based shared resource available at fractional capacity at all times
Time-shared resource availabe at full capacity at some times
time
task
re-source
task
scheduler
time
time
task
13
Periodic Resource Model Periodic resource model Γ(P,Q)
a time-shared resource, characterizes periodic resource allocations period P and allocation time Q Resource utilization UΓ= Q/P Example, P = 3, Q = 2
0 1 2 3 4 5 6 7 8 9 time
14
Outline Compositional Real-time Scheduling Frame-
work Motivation Real-time Resource Modeling Schedulability Analysis Component Timing Abstraction
Schedulability Analysis
15
Traditional Schedulability Analysis Demand-based analysis with dedicated re-
source
≤resource demandduring an interval of
length t
TaskTask
Scheduler
t
16
Schedulability Analysis Demand- and supply-based analysis with peri-
odic (time-shared) resource
≤ resource sup-ply,
during an inter-val of length t
resource demandduring an interval of
length t
TaskTask
Scheduler Peri-odicRe-
source
17
Resource Demand Bound Resource demand bound function
dbf(W,A,t) : the maximum possible resource de-mand of a task set W under algorithm A during an interval of length t
Demand Bound Functions For a periodic task set W = {Ti(pi,ei)},
dbf (W,A,t) for EDF [Baruah et al.,‘90]
dbf (W,A,t,i) for RM [Lehoczky et al., ‘89]
i
WT ie
pt
i
t)EDF,(W, dbf
k
THPT ki e
pte
ik
)(
i) t,RM,(W, dbf
18
19
Resource Supply Resource supply bound function
sbf Γ (t) : the minimum resource supply by resource Γ over all intervals of length t
Periodic resource Γ(3,2)
0 time
Γ(3,2)
t=1t=2t=3 t=5t=4t=1
Periodic Resource Model Supply bound function sbfΓ(t)
otherwise
)1(,2)1( if)1(
))(1()t(sbf
QPkQPktPkQPkt
20
0 1 2 3 4 5 6 7 8 9 10
t supp
ly
Schedulability Condition - EDF A periodic task set W is schedulable under EDF if and only if
[Baruah et al. ’90]
t t)EDF,dbf(W, 0t
)t(sbf t)EDF,dbf(W, 0t
21
over the worst-case resource supply of periodic resource model Γ(P,Q)
[Shin & Lee, ’03]
22
Schedulability Condition - RM A periodic task set W is schedulable under
RM over the worst-case resource supply of periodic resource model Γ(P,Q)
if and only if [Shin & Lee, ’03]
)t(sbf i) t,RM,dbf(W,W T pt0 ii
23
Schedulability Analysis Demand- and supply-based analysis
≤ resource sup-ply,
P. TaskP. Task
EDF/RM Peri-odicRe-
source
resource demand
naturally extensible with other scheduler, task models,
and/or resource models, as long as they can provide
resource demand and supply bounds.
24
Outline Compositional Real-time Scheduling Frame-
work Motivation Resource Modeling Schedulability Analysis Component Timing Abstraction
Component Timing Abstraction
Component Timing Abstraction Abstracting the collective real-time re-
quirements of a component as a single real-time requirement (real-time compo-nent interface)
25
Peri-odic
(50,7)
EDF
Peri-odic
(70,9)
real-time compo-
nentinterface
Peri-odic
(50,7)
Peri-odic
(70,9)
Real-Time Requirement
EDF
Component Timing Abstraction Finding a periodic resource model Γ(P,Q)
that guarantees the schedulability of a component
26
Peri-odic
(50,7)
EDF
Peri-odic
(70,9)
real-time compo-
nentinterface
periodic re-sourceΓ(P,Q)
periodic interface
Γ(P,Q)
Abstraction - Example In this example, a solution space of a peri-
odic resource Γ(P,Q) is
Solution Space under EDF
0
0.2
0.4
0.6
0.8
1
1 10 19 28 37 46 55 64 73
resource period
reso
urce
util
izat
ion
27
Γ(P,Q)
Peri-odic
(50,7)
EDF
Peri-odic
(70,9)
Abstraction - Example An approach to pick one out of solution
space Given a range of P, we can pick Γ(P,Q) such
that UΓ is minimized. (for example, 28 ≤ P ≤ 46)
(a) Solution Space under EDF
0
0.2
0.4
0.6
0.8
1
1 10 19 28 37 46 55 64 73
resource period
reso
urce
cap
acity
28
Γ(P,Q)
Peri-odic
(50,7)
EDF
Peri-odic
(70,9)
Γ(29, 9.86)
Abstraction
29
periodic interface
Γ(29, 9.86)
UW=0.27 UΓ=0.34
Peri-odic
(50,7)
EDF
Peri-odic
(70,9)
Abstraction Overhead Abstraction overhead (OΓ) is
30
1-UU
W
periodic interface
Γ(29, 9.86)
UW=0.27 UΓ=0.34
0.34/0.27 – 1 = 0.26
Peri-odic
(50,7)
EDF
Peri-odic
(70,9)
Abstraction Overhead Bound Abstraction overhead (OΓ) is
A = EDF
A = RM
W
W
UkU
2
)1(2O EDF,
1
12122log
1O RM,
W
W
UkUk
31
32
Abstraction Overhead Simulation Results
with periodic tasks and periodic resource under EDF/RM
the number of tasks n : 2, 4, 8, 16, 32, 64 the workload utilization U(W) : 0.2~0.7 ratio between the resource period and minimum
task period : represented by k
33
Abstraction Overhead
0
0.2
0.4
0.6
0.8
1 2 4 8 16 32 64
k
Analytical Bound - RM Analytical Bound - EDF
Simulation Result - RM Simulation Result - EDF
k ≈ Pmin /P, UW = 0.4, n = 8
Conclusion Compositional scheduling framework
Allows composition of multiple timing properties into one
Provides key techniques for component-based de-sign over real-time systems
Naturally applicable to many domains, including some systems areas such as Hypervisor + guest OS Distributed systems
35
Key References Compositional real-time scheduling framework
Periodic, independent tasks over uniprocessor RTSS ’03 (Best Paper), ’04, EMSOFT ’06 ACM TECS (Trans. on Embedded Computing Sys-
tems)’08 Synchronization
RTSS ’08 (Best Paper Runner-Up), EMSOFT ’07 IEEE TII (Transactions on Industrial Informatics) ’09
Multiprocessors ECRTS ’08 (Best Paper Runner-Up) Real-Time Systems Journal ’09