370 likes | 591 Views
Real- Time Scheduling II : Compositional Scheduling Framework. Insik Shin Dept. of Computer Science KAIST. Timing Composition. What is a problem? How to compose two or more timing properties into a single timing property. T 1. T 2. T 3. Timing Composition. What is a problem?
E N D
Real-Time Scheduling II:Compositional Scheduling Framework Insik Shin Dept. 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 single timing property • How useful is it? • It serves as a basis for the design and analysis of component-based real-time systems • i.e., for real-time component interfaces that abstract the collective timing requirements of individual workloads within components T1 T2 T3
CPU Hierarchical Scheduling Scheduler EDF Application 1 (component) Application 2 (component) S RM S EDF Task Task Task Task
CPU Hierarchical Scheduling - Issues • System-level scheduler’s viewpoint What is the real-time requirements of each application ? Scheduler Application 1 Application 2 S S Task Task Task Task
CPU CPU Share Hierarchical Scheduling - Issues • Application-level scheduler’s viewpoint Real-time guarantees from CPU supply? Scheduler S How can we achieve schedulabilityanalysis with this CPU share? S Task Task Task Task
CPU interface interface Proposed Framework - Overview • Interface-based hierarchical scheduling framework Scheduler S S Task Task Task Task
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
task task resource Proposed Framework - Assumptions • Tasks • periodic • independent • fully preemptable • synchronously released • Uni-processor scheduling • Scheduling algorithms : EDF / RM scheduler
task 2 task 1 resource Real-Time Resource Modeling • Real-time virtual resource model • Characterize the timing property of resource allocations provided to a single task (application/component) • Previous approaches • rate-based resource model • Our approach • temporally partitioned resource model scheduler
task task task time resource time 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 scheduler time
Periodic Resource Model • Periodic resource model Γ(P,Q) • a time-shared resource, • characterizes periodic resource allocations • period Pand allocation time Q • Resource utilization UΓ= Q/P • Example, P = 3, Q = 2 0 1 2 3 4 5 6 7 8 9 time
Outline • Compositional Real-time Scheduling Framework • Motivation • Real-time Resource Modeling • Schedulability Analysis • Component Timing Abstraction Schedulability Analysis
Traditional Schedulability Analysis • Demand-based analysis with dedicated resource resource demand during an interval of lengtht ≤ t Scheduler Task Task
Periodic Resource Schedulability Analysis • Demand- and supply-based analysis with periodic (time-shared) resource resource supply, during an interval of lengtht resource demand during an interval of lengtht ≤ Scheduler Task Task
Resource Demand Bound • Resource demand bound function • dbf(W,A,t) : the maximumpossible resource demand of a task set Wunder algorithm A during an interval of lengtht
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]
t=1 t=1 t=2 t=3 t=4 t=5 Γ(3,2) 0 time Resource Supply • Resource supply bound function • sbfΓ(t) : the minimumresource supply by resourceΓ over all intervalsof lengtht • Periodic resource Γ(3,2)
Periodic Resource Model • Supply bound function sbfΓ(t) supply t 0 1 2 3 4 5 6 7 8 9 10
Schedulability Condition - EDF over the worst-case resource supply of periodic resource modelΓ(P,Q) • A periodic task set W is schedulable under EDF if and only if [Baruah et al. ’90] [Shin & Lee, ’03]
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]
Periodic Resource Schedulability Analysis • Demand- and supply-based analysis naturally extensible with other scheduler, task models, and/or resource models, as long as they can provide resource demand and supply bounds. ≤ resource demand resource supply, EDF/RM P. Task P. Task
Outline • Compositional Real-time Scheduling Framework • Motivation • Resource Modeling • Schedulability Analysis • Component Timing Abstraction Component Timing Abstraction
Periodic (50,7) Periodic (70,9) Periodic (50,7) Periodic (70,9) Real-Time Requirement EDF Component Timing Abstraction • Abstracting the collective real-time requirements of a component as a single real-time requirement (real-time component interface) real-time component interface EDF
Periodic (50,7) Periodic (70,9) periodic interface Γ(P,Q) Component Timing Abstraction • Finding a periodic resource model Γ(P,Q)that guarantees the schedulability of a component periodic resource Γ(P,Q) real-time component interface EDF
Periodic (50,7) Periodic (70,9) Γ(P,Q) Abstraction - Example • In this example, a solution space of a periodic resource Γ(P,Q) is EDF
Periodic (50,7) Periodic (70,9) Γ(P,Q) 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) Γ(29, 9.86) EDF
Periodic (50,7) Periodic (70,9) periodic interface Γ(29, 9.86) Abstraction EDF UW=0.27 UΓ=0.34
Periodic (50,7) Periodic (70,9) periodic interface Γ(29, 9.86) Abstraction Overhead • Abstraction overhead (OΓ) is EDF UW=0.27 UΓ=0.34 0.34/0.27 – 1 = 0.26
Abstraction Overhead Bound • Abstraction overhead (OΓ) is • A = EDF • A = RM
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
Abstraction Overhead • 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 design over real-time systems • Naturally applicable to many domains, including some systems areas such as • Hypervisor + guest OS • Distributed systems
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 Systems)’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