Presentation is loading. Please wait.

Presentation is loading. Please wait.

Non-Preemptive Access to Shared Resources in Hierarchical Real-Time Systems Marko Bertogna, Fabio Checconi, Dario Faggioli CRTS workshop – Barcelona, November,

Similar presentations


Presentation on theme: "Non-Preemptive Access to Shared Resources in Hierarchical Real-Time Systems Marko Bertogna, Fabio Checconi, Dario Faggioli CRTS workshop – Barcelona, November,"— Presentation transcript:

1 Non-Preemptive Access to Shared Resources in Hierarchical Real-Time Systems Marko Bertogna, Fabio Checconi, Dario Faggioli CRTS workshop – Barcelona, November, 30th Scuola Superiore S.Anna, Pisa, Italy

2 30/11/2008 Marko Bertogna CRTS Workshop, Barcelona2 Outline Target architecture Shared resource protocols Non-preemptive execution of CS Schedulability tests Admission control Simulations Conclusions and future extensions

3 30/11/2008 Marko Bertogna CRTS Workshop, Barcelona3 Hierarchical systems CPU ……… Q 3, P 3 Q 1, P 1 Q 2, P 2 C1C1 C2C2 C3C3 Component = Task or Server

4 30/11/2008 Marko Bertogna CRTS Workshop, Barcelona4 Target architecture General purpose OS supporting hierarchical execution on a single processor Set of independently developed applications with soft real-time requirements Different applications may access common shared resources (Local vs global) Few information available on tasks timely parameters Fast scheduling and resource arbitration protocols

5 30/11/2008 Marko Bertogna CRTS Workshop, Barcelona5 Access to shared resources Problem with classic protocols (i.e. SRP, PCP) to work properly (ceiling computation)  need to know a priori which shared resources will be accessed by each task for schedulability analysis  need to know the length of critical sections (at least reasonable upper bounds) not suitable for highly dynamic systems and general purpose OS Classic servers incur the budget exhaustion problem

6 30/11/2008 Marko Bertogna CRTS Workshop, Barcelona6 Budget exhaustion problem Server 1 Q = 10, P = 100 Server 2 Q = 90, P = 100 Lock (R1) Unlock (R1) BLOCKED Lock (R1)

7 30/11/2008 Marko Bertogna CRTS Workshop, Barcelona7 Solution Perform a “ budget check ” before each locking operation BROE server (Fisher, Bertogna, Baruah – RTSS ’ 07) CBS-like server for hierarchical systems with support for globally shared resources If CS_length ≤ q  acquire lock Else  wait until virtual time equals real time Q = 10 P = 100 |CS| = 5 WAIT q = 4 q = 10 Lock (R1) t = 6

8 30/11/2008 Marko Bertogna CRTS Workshop, Barcelona8 Non-preemptive access to shared resources Disable preemptions before each locking operations No need for complex locking protocols Reduced resource holding times Very efficient with small CS lengths Simple algorithms to derive safe non-preemptive chunk lengths [see Baruah, ECRTS ’ 05] O(n), O(1) Pseudo-polynomial (tight?) h i = maximum non-preemptive chunk length for component C i

9 30/11/2008 Marko Bertogna CRTS Workshop, Barcelona9 Component interface CPU ……… Q 3, P 3, h 3 Q 1, P 1, h 1 Q 2, P 2, h 2 C1C1 C2C2 C3C3 h i ≤ Q i h i (child) ≤ h i (parent)

10 30/11/2008 Marko Bertogna CRTS Workshop, Barcelona10 O(n) test A set of components that is schedulable with preemptive EDF on a (Q,P) server remains schedulable if each component C k executes non-preemptively for at most time units, with.

11 30/11/2008 Marko Bertogna CRTS Workshop, Barcelona11 O(1) test A set of components that is schedulable with preemptive EDF on a (P,Q) server remains schedulable if all components execute non- preemptively for at most time units.

12 30/11/2008 Marko Bertogna CRTS Workshop, Barcelona12 Admission control The system keeps track of the largest critical section R i locked by each component C i Scheduling invariants: R i ≤ h i, for all i R max ≤ h When a new component asks to be admitted at a particular level: compute new h i ’ values (for all components with larger periods at the same level) if for any admitted component: R i > h i ’  reject the new component else admit component and update h i values to h i ’

13 30/11/2008 Marko Bertogna CRTS Workshop, Barcelona13 Admission control policies When a component locks a critical section for longer than h i : suspend it  budget exhaustion problem (may lead to deadlock conditions in case of nested CS) abort it  possible system inconsistencies continue executing it  temporal system overrun Then, restore system schedulability by removing the component(s) with: largest utilization least importance latest arrival time longest critical section

14 30/11/2008 Marko Bertogna CRTS Workshop, Barcelona14 Observations No need to know a priori the critical section lengths  upper bounds extracted and refined at run-time Components conditionally admitted into the system System dynamically converges to a stable condition No way to preventively avoid CS overruns

15 30/11/2008 Marko Bertogna CRTS Workshop, Barcelona15 Simulations 10 entities Q = 5 P = 100 U: [0.1;0.9] T: [20P;500P]

16 30/11/2008 Marko Bertogna CRTS Workshop, Barcelona16 Simulations 10 entities Q = 50 P = 100 U: [0.1;0.9] T: [5P;50P]

17 30/11/2008 Marko Bertogna CRTS Workshop, Barcelona17 Conclusions Simple protocol for CS arbitration in hierarchical systems Particularly suited for general purpose OS ’ s Reduced overhead User doesn ’ t need to specify any information on CS lengths System dynamically extracts timely parameters to grant soft real time requirements

18 30/11/2008 Marko Bertogna CRTS Workshop, Barcelona18 Next Step Pseudo-polynomial algorithms to find tight bounds on the NP chunk lengths Adapt our protocol to multicore systems Generalize to multicore hierarchical systems Implement in Linux (particular attention to overall complexity) Final results expected by the end of 2009


Download ppt "Non-Preemptive Access to Shared Resources in Hierarchical Real-Time Systems Marko Bertogna, Fabio Checconi, Dario Faggioli CRTS workshop – Barcelona, November,"

Similar presentations


Ads by Google