26 April A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of Computer and Information Science University of Pennsylvania
SDRL & RTG Depart. Of Computer and Information Science 26 April Scheduling Framework Example CPU OS Scheduler Digital ControllerMultimediaPeriodic Task T(p,e) T 1 (25, 5) Periodic Task T(p,e) T 2 (33, 10)
SDRL & RTG Depart. Of Computer and Information Science 26 April Motivating Example CPU OS Scheduler Java Virtual Machine J 1 (25,4)J 2 (40,5) VM Scheduler Multimedia T 2 (33,10) Digital Controller T 1 (25,5)
SDRL & RTG Depart. Of Computer and Information Science 26 April VM Scheduler’s Viewpoint CPU OS Scheduler Multimedia T 2 (33,10) Digital Controller T 1 (25,5) Java Virtual Machine J 1 (25,4)J 2 (40,5) VM Scheduler CPU Share Real-Time Guarantee on CPU Supply
SDRL & RTG Depart. Of Computer and Information Science 26 April Problems & Approach I Resource supply modeling –Characterize temporal property of resource allocations we propose a periodic resource model –Analyze schedulability with the new resource model Java Virtual Machine J 1 (25,4)J 2 (40,5) VM Scheduler Periodic CPU Share
SDRL & RTG Depart. Of Computer and Information Science 26 April OS Scheduler’s Viewpoint CPU OS Scheduler Java Virtual Machine J 1 (25,4)J 2 (40,5) VM Scheduler Multimedia T 2 (33,10) Digital Controller T 1 (25,5) Real-Time TaskReal-Time Demand
SDRL & RTG Depart. Of Computer and Information Science 26 April Problem II Real-Time Composition –Combine multiple real-time requirements into a single real-time requirement guaranteeing schedulability –Example: periodic task model T(p,e) Real-Time Constraint Real-Time Constraint Real-Time Constraint EDF/RM T 1 (3, 1)T 2 (4, 1)T (?, ?)
SDRL & RTG Depart. Of Computer and Information Science 26 April Approach I I Simple approach : T(p,e) –p = LCM (T 1, T 2 ) LCM (T 1, T 2 ) = T 1 xN 1 = T 2 xN 2 –e = p x (U 1 + U 2 ), U i = e i /p i EDF T 1 (3, 1)T 2 (4, 1)T (12, 7) T (?, ?) (12,7)T Deadline Miss !
SDRL & RTG Depart. Of Computer and Information Science 26 April Approach II Our approach : periodic task model T(p,e) EDF T 1 (3, 1)T 2 (4, 1)T (2, 4/3) (12,7)T (12,7)T
SDRL & RTG Depart. Of Computer and Information Science 26 April Outline 1.Scheduling component modeling Periodic resource model 2.Scheduling component schedulability analysis 3.Scheduling component composition Combine the real-time guarantees of multiple components into the real-time guarantee of a single component
SDRL & RTG Depart. Of Computer and Information Science 26 April Scheduling Component Modeling Scheduling –assigns resources to workloads by algorithms Scheduling Component Model : M(W,R,A) –W : workload model –R : resource model –A : scheduling algorithm Resource Scheduler WorkloadPeriodic TaskWorkloadPeriodic Task EDF / RM ???
SDRL & RTG Depart. Of Computer and Information Science 26 April Resource Modeling Dedicated resource –Available all the time at its full capacity 0time
SDRL & RTG Depart. Of Computer and Information Science 26 April Resource Modeling Dedicated resource –Available all the time at its full capacity Fractional resource (slow resource) –Available all the time at its fractional capacity 0time
SDRL & RTG Depart. Of Computer and Information Science 26 April Resource Modeling Dedicated resource –Available all the time at its full capacity Fractional resource (slow resource) –Available all the time at its fractional capacity Partitioned resource [FeMo ’02] –Available all some times at its full capacity 0time
SDRL & RTG Depart. Of Computer and Information Science 26 April Resource Modeling Dedicated resource –Available all the time at its full capacity Fractional resource (slow resource) –Available all the time at its fractional capacity Partitioned resource –Available all some times at its full capacity Periodic resource R(period, allocation time) (ex. R(3,2)) –Available periodically at its full capacity 0time
SDRL & RTG Depart. Of Computer and Information Science 26 April T 2 (20,4)T 1 (10,2) Scheduling Component Analysis Schedulability conditions –Exact conditions for EDF/RM Schedulability bounds –Utilization bounds for periodic workload under EDF/RM –Capacity bounds for periodic resource under EDF/RM Periodic Resource Scheduler Periodic Task EDF / RM
SDRL & RTG Depart. Of Computer and Information Science 26 April Schedulability Conditions (EDF) Scheduling component M(W,R,EDF) is schedulable iff for all interval length t, demand w (EDF,t) ≤ supply R (t) [RTSS03] –demand w (EDF,t) : the maximum resource demand of workload W for an interval length t –supply R (t) : the minimum resource supply by resource R for an interval length t demand(EDF,t) =
SDRL & RTG Depart. Of Computer and Information Science 26 April supply = supply R (3) = 1 0time R(3,2) t
SDRL & RTG Depart. Of Computer and Information Science 26 April Schedulability Conditions (RM) Scheduling component M(W,R,RM) is schedulable iff for all task T i (p i,e i ), r i (R) ≤ p i [RTSS03] –r i (R): the maximum response time of task T i over R. the smallest time t s.t. demand(RM,i,t) ≤ supply R (t) demand(RM,i,t) =
SDRL & RTG Depart. Of Computer and Information Science 26 April Schedulability Conditions (RM) Scheduling component M(W,R,RM) is schedulable iff for all task T i (p i,e i ), r i (R) ≤ p i [RTSS03] –Example of finding the maximum response time r i (R) time resource demand r i (R) demand(RM,i,t) supply R (t)
SDRL & RTG Depart. Of Computer and Information Science 26 April Motivating Example for Capacity Bound Given a task group G such that –Scheduling algorithm : EDF –A set of periodic tasks : { T 1 (3,1), T 2 (7,1) }, model the timing requirements of the task group with a periodic task model G (3, 1.43) based on utilization does not work !! Deadline miss for T 2
SDRL & RTG Depart. Of Computer and Information Science 26 April Motivating Example (2) Given a task group G such that –Scheduling algorithm : EDF –A set of periodic tasks : { T 1 (3,1), T 2 (7,1) }, model the timing requirements of the task group with a periodic task model G (3, 2.01) works !!
SDRL & RTG Depart. Of Computer and Information Science 26 April Capacity Bounds Resource capacity –For a periodic resource R(p,e), its capacity is e/p. Capacity bound of a component C(W, R(p,e), A) : CB(C) –C is schedulable if CB(C) ≤ e/p How to get the capacity bounds of C(W,R(p,e),A) –assumption: the period p of R is given. –using the exact schedulability conditions, we can get the minimum capacity of R satisfying the condition. T 1 (25,4) T 2 (40,5) EDF R(10, ? ) R(10, 3.1) CB(C) = 3.1/10
SDRL & RTG Depart. Of Computer and Information Science 26 April Compositional Real-Time Guarantees T 11 (25,4) T 12 (40,5) T 21 (25,4) T 22 (40,5) R(?, ?) EDF RM R 2 (?, ?)R 1 (?, ?)R 1 (10, 3.1)R 2 (10, 4.34)
SDRL & RTG Depart. Of Computer and Information Science 26 April Compositional Real-Time Guarantees T 21 (25,4) T 22 (40,5) R(?, ?) EDF RM R(5, 4.4) R 2 (10, 4.4) T 2 (10, 4.4) T 11 (25,4) T 12 (40,5) EDF R 1 (10, 3.1) T 1 (10, 3.1)
26 April Conclusion Summary –Periodic resource model –Scheduling component modeling and anaylsis –Scheduling component composition Future work –To evaluate the composition overhead in current framework –To extend our framework with other resource models for Efficient composition w.r.t utilization and complexity Ensure composition properties, i.e., –C 1 || (C 2 || C 3 ) = (C 1 || C 2 ) || C 3 –|| (C 1, C 2, C 3 ) = || (||(C 1, C 2 ), C 3 )
SDRL & RTG Depart. Of Computer and Information Science 26 April THE THE END END THE THANK YOU
SDRL & RTG Depart. Of Computer and Information Science 26 April Schedulability Conditions (EDF) Scheduling component M(W,R,EDF) is schedulable iff for all interval length t, demand w (t) ≤ t [BHR90] demand w (t) ≤ supply R (t) –demand w (t) : the maximum resource demand of workload W over all intervals of length t –supply R (t) : the minimum resource supply by resource R over all intervals of length t Resource demand in an interval Resource supply during the interval (from a dedicated resource)
SDRL & RTG Depart. Of Computer and Information Science 26 April Scheduling component M(W,R,RM) is schedulable iff for all task T i (p i,e i ), r i ≤ p i [AB+93] duration R (r i ) ≤ p i –r i : the maximum response time of task T i : the maximum resource demand of W to finish T i –duration R (t) : the maximum time that resource R takes to supply a t-time-unit resource Schedulability Conditions (RM) Duration to receive r i -time-unit resource allocation Deadline to receive r i -time-unit resource allocation Max. Duration to receive r i -time-unit resource allocation Deadline to receive r i -time-unit resource allocation