Presentation is loading. Please wait.

Presentation is loading. Please wait.

Resource Augmentation for Performance Guarantees in Embedded Real-time Systems Abhilash Thekkilakattil Licentiate Thesis Presentation Västerås, November.

Similar presentations


Presentation on theme: "Resource Augmentation for Performance Guarantees in Embedded Real-time Systems Abhilash Thekkilakattil Licentiate Thesis Presentation Västerås, November."— Presentation transcript:

1 Resource Augmentation for Performance Guarantees in Embedded Real-time Systems Abhilash Thekkilakattil Licentiate Thesis Presentation Västerås, November 30, 2012

2 Real-time tasks Dependable Real-time Systems web images Timing characteristics of the physical components Fault tolerance requirements Event occurrences: periodic and sporadic

3 Periodic and Sporadic Real-time Tasks job1job2 Worst Case Execution Time (Min/Exact) Inter-arrival time Release time Relative deadline Task worst case execution time scales with processor frequency Assumption: probabilistic task release times for sporadic tasks

4 Real-time Scheduling  Real-time scheduling: guarantee task completions before their deadline Non-preemptive Scheduling Low runtime overhead  Increased blocking times: low utilization Mutual exclusion by construction Preemptive Scheduling Ability to achieve high utilization  Preemption costs  Need for synchronization protocols high priority low priority preemption cost high priority low priority blocking Limited Preemption Scheduling Best of preemptive and non-preemptive: preempt only when necessary high priority low priority Bounded non-preemptive region preemption cost

5 Preemption Related Overheads ●Context switch related overheads:  Overhead involved in saving and retrieving the context of the preempted task ●Cache related preemption delays  Overhead involved in reloading cache lines  Order of 100s of micro-seconds  Vary with the point of preemption  Increased bus contention ●Pipeline related overheads  Clear the pipeline upon preemption  Refill the pipeline upon resumption

6 CPU frequency: P: Power consumption C: Effective capacitance V: Applied voltage F: CPU frequency Processor power consumption: minmax CPU frequency Frequency Scaling in Modern Processors Hypothesis: Processor speed-up can be used to provide non-preemption guarantees

7 Research Questions Q1: How can we control preemptions in periodic real-time task systems using CPU frequency scaling? Q2: How can we control preemptions in sporadic real-time task systems using CPU frequency scaling when the probabilities of the task releases are known?

8 Research Contributions- Question 1 Q1: How can we control preemptions in periodic real-time task systems using CPU frequency scaling? Paper A: Reducing the Number of Preemptions in Real-Time Systems Scheduling by CPU Frequency Scaling, Abhilash Thekkilakattil, Anju S Pillai, Radu Dobrin, Sasikumar Punnekkat, The 18th International Conference on Real-Time and Network Systems, Toulouse, France, November, 2010 Overview: 1.Offline preemption identification 2.Preemption elimination  Calculate the minimum frequency required to eliminate the preemption  Analyze the effect of preemption elimination on the rest of the schedule 3. Iteration: until no more preemptions can be eliminated

9 Preemption Elimination: Periodic Tasks C=1C=4 D starts earlier C=1 C=2 4812162024283236400 4812162024283236400 4812162024283236400 4812162024283236400 Task A B C D Rate monotonic schedule ModesM1M2M3 Frequency (Hz) 100150300 F C1 =6F 1 =600 HzF C1 =1.5F 1 =150 Hz F D1 =4F 1 =400 Hz F C2 =3F 1 =300 Hz WCETPeriod 14 28 620 440 Task123456789 A100 B ---- C ------- D -------- 10 100 - - - 150300 Task instance frequencies (Hz) Processor modes Before elimination: 7 After step 1: 7After step 2: 4After step 3: 4After step 4: 2

10 Overview: 1.Offline Phase  Determine permitted deviations in the minimum inter-arrival times of the tasks using probabilities 2.Online Phase  Online preemption control algorithm  Speed-up busy period before a preemption Research Contributions- Question 2 Q2: How can we control preemptions in sporadic real-time task systems using CPU frequency scaling when the probabilities of the task releases are known? Paper B: Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks, Abhilash Thekkilakattil, Radu Dobrin, Sasikumar Punnekkat, The 7th IEEE International Symposium on Industrial Embedded Systems, Karlsruhe, Germany, June, 2012

11 Preemption Elimination: Sporadic Tasks TaskWCETInter-arrival time A15 B37 C320 5 10 5 5 A B C Original Rate Monotonic Schedule

12 Offline Phase TaskWCETTime perio d Relaxation to min. inter-arrival times for threshold probability =0.20 Relaxation to min. inter-arrival times for threshold probability =0.24 A1513 B3713 C32013 0 2 4 5 6 78 9 10 0.04 0.08 3 0.24 1 0.20 0.02 0.04 0.08 0.1 0.08 (time) Task release probability

13 Online Phase TaskWCETInter-arrival time Relaxation A151 B371 C3201 5 10 5 5 A B C C = C A + C B + C C = 7 t = 6 (since we use release time probabilities) Speed = 7/6  We speed-up to max. speed: simplicity earliest possible preemption point C = C B = 3 t = 1 Speed = 3/1

14 Summary: Paper A and B Manipulate processor speed to control the task preemptive behavior  Requires no significant modifications to the scheduler  Requires no significant modifications to the task attributes  Trade-offs: energy vs. number of preemption  Effective: significant preemption reduction shown in simulations  Limitations: increased energy consumption

15 “There is more to life than simply increasing its speed.” Mahatma Gandhi What is the bound on the required speed-up?

16 Resource Augmentation Introduced by B. Kalyanasundaram and K. Pruhs, “Speed is as powerful as clairvoyance,” Journal of ACM, 2000. How good is any given online scheduler when compared to an all powerful malevolent adversary? -Efficiency or ‘goodness’ of the scheduler Give more resources to the scheduler to satisfy the goal function –Most commonly considered resource: processor (speed-up) Is the speed-up required bounded (affordable)? Previous work: upper-bounds on the speed-up to, –Ensure optimal performance for non-clairvoyant online schedulers compared to a clairvoyant scheduler (Kalyanasundaram et. al) –Guarantee FPS schedulability for all feasible task sets (Baruah et. al and Davis et. al)

17 Research Questions Q1: How can we control preemptions in periodic real-time task systems using CPU frequency scaling? Q2: How can we control preemptions in sporadic real-time task systems using CPU frequency scaling when the probabilities of the task releases are known? Q3: What is the resource augmentation bound that guarantees the feasibility of a specified non-preemption behavior in a real-time system?

18 Paper C: Quantifying the Sub-Optimality of Non-Preemptive Real-time Scheduling, Abhilash Thekkilakattil, Radu Dobrin, Sasikumar Punnekkat, Technical Report, MRTC, November, 2012 Overview: 1.Processor speed-up to guarantee specified non-preemption behavior  Upper-bound of 4L i /D min L i : required length of the Non-Preemptive Region (NPR) D min : shortest deadline 2.Processor speed-up to guarantee non-preemptive scheduling  Upper-bound of 4C max /D min C max : largest execution time in the task set 3.Processor speed-up to bound preemption overheads  Derivation of non-preemption requirements  Sensitivity analysis to calculate the optimal processor speed Research Contributions- Question 3

19 Resource Augmentation for Preemption Control t DBF(t) DBF(t): demand bound function at ‘t’ L i : Length of the NPR LiLi S = max (DBF(t)/ (t - L i )) S ≤ t / (t - L i ) S ≤ y / (y - 1) [ y = t/L i ] case 1: S ≤ 2 [ y ≥ 2 ]case 2: S ≤ 4 [ 1 ≤ y < 2 ]case 3: S ≤ 4L i /t [ 0 < y < 1 ] Is S bounded ? DBF(t) DBF(t)/S => S ≤ 4L i /D min [ t = D min ] Proof in thesis ?

20 Preemption Behavior of Scheduling Paradigms high priority low priority preemption cost high priority low priority Bounded non-preemptive region Fully preemptive scheduler Limited preemption scheduler Controlling the length of the non-preemptive region Unbounded number of preemptions Requires synchronization protocols Bounded number of preemptions: bounded by the length of the non-preemptive regions Control the bound on the number of preemptions May require synchronization protocols Does not require synchronization protocols Bounded non-preemptive region high priority low priority

21 Bounding Preemption Costs non-preemptive region (bounded length Q i S ) No. of preemptions p i (processor speed: S) Enable preemptions at optimal preemption points Executing critical sections within non-preemptive regions high priority low priority Step 2. Perform sensitivity analysis to calculate the optimal processor speed Step 1. Derive non-preemption requirements to control preemption related overheads

22 What does the processor speed-up bound mean?

23 Feasibility of Real-time Tasks Feasibility: Does a schedule that guarantees no deadline misses exist for a given real-time task set? Preemptive EDF: optimal uni-processor scheduling algorithm Non-preemptive EDF (non-idling): optimal non-preemptive scheduling algorithm How good is non-preemptive scheduling when compared to uni-processor optimal preemptive scheduling algorithms such as EDF? Set of uni-processor feasible task sets Set of limited preemption feasible task set on a uni- processor Set of non-idling non- preemptive feasible task sets on a uni- processor

24 1 4C max /D min 4L/D min The Feasibility Bucket We can quantify the ‘goodness’ or sub-optimality of non-preemptive scheduling in terms of the processor speed-up required to guarantee a fully non-preemptive schedule for the uni- processor feasible task sets. Set of uni-processor feasible task sets Set of limited preemption feasible task set on a uni-processor Set of non-idling non- preemptive feasible task sets on a uni-processor Speed at which all uni-processor feasible task sets are guaranteed a non-preemptive execution for L units Speed at which all uni-processor feasible task sets are guaranteed a fully non-preemptive schedule (under non-idling paradigm) Slower Processor Speed faster

25 Summary: Paper C  Guarantee specified preemption behavior Upper-bound on the required speed-up  Sub-optimality of non-preemptive scheduling Resource augmentation bound for non-preemptive scheduling If there exists a scheduling algorithm that can schedule a given set of real- time tasks on a uni-processor, then non-preemptive EDF can schedule it, if given a processor that is 4C max /D min times faster  Method to bound preemption related costs Derive corresponding non-preemption requirements Sensitivity analysis based method to find the required optimal speed-up We have addressed the problem of providing non-preemption guarantees in a real-time system using processor speed-up.

26 “Failure is simply the opportunity to begin again, this time more intelligently.” Henry Ford …which is exactly the design philosophy behind fault tolerant real-time systems that uses temporal redundancy.

27 Fault Tolerant Real-time Scheduling Temporal redundancy under transient faults Fault tolerance related overhead  Fault tolerance feasibility (FT-feasibility): existence of a real-time schedule that is fault tolerant under a specified fault hypothesis Transient faults Temporal redundancy  Guaranteeing FT-feasibility: ensure sufficient slack for at least one successful execution of all the tasks Control fault tolerance related overheads Control task execution times

28 Fault Tolerance Feasibility Nature of errors -Normally continuous events e.g., a vehicle passing through electromagnetic fields -Occur continuously over a period of time: error bursts Challenging to handle in classical FT-feasibility analysis -Need to map continuous events into singleton events How can we guarantee FT-feasibility under error bursts? -Hypothesis: use a faster processor faults/errors as singleton events error burst traditional FT-feasibility analysis

29 Research Questions Q1: How can we control preemptions in periodic real-time task systems using CPU frequency scaling? Q2: How can we control preemptions in sporadic real-time task systems using CPU frequency scaling when the probabilities of the task releases are known? Q3: What is the resource augmentation bound that guarantees the feasibility of a specified non-preemption behavior in a real-time system? Q4: What is the resource augmentation bound that guarantees the fault tolerance feasibility in real-time systems under error bursts?

30 Paper D: Resource Augmentation for Fault-Tolerance Feasibility of Real-time Tasks under Error Bursts, Abhilash Thekkilakattil, Radu Dobrin, Sasikumar Punnekkat and Huseyin Aysan, The 20 th International Conference on Real-time and Network Systems (shortlisted for best paper award), ACM, Pont à Musson, France, November, 2012 Overview: 1.Fault tolerance feasibility (FT-feasibility) analysis  Builds on the optimality of EDF to schedule real-time tasks  Derive a sufficient condition for FT-feasibility 2.Resource augmentation bounds to guarantee FT-feasibility  Processor speed-up to make up for the slack deficit to enable temporal redundancy  Upper-bound (error burst length ≤ D min /2): 6  Upper-bound (general case): 3y/(y-1), y=t/error burst length Research Contributions- Question 4

31 Problem Description Questions: ●How can we perform an FT-feasibility analysis for a given set of temporally redundant real-time tasks under a specified error burst length? ●If the real-time task set is not found to be FT-feasible, what is the lowest processor speed that guarantees its FT-feasibility under the error burst?

32 Definitions t T length worst case error overhead (E t ) ε Worst Case Temporal Wastage (W err (t)) = maximum wasted execution time ∑ ε T length

33 Assumptions ● Scheduler: Fault Tolerant Earliest Deadline First (FT-EDF)- schedule task executions and re-execution according to their deadlines ● Objective: find the Worst Case Temporal Wastage at time t - Break down into cases ● Strategy: we assume that there are no deadline misses under the error burst and derive the sufficient condition for this to be true t’t’ t abs. deadline of τ i Error detection τiτi

34 Case 1 τiτi τjτj τkτk t’t’t τiτi τjτj τkτk t’t’t τiτi τjτj τkτk t’t’t Worst Case Temporal Wastage at t when the error burst hits only a single job scenario A: W err (t)=2(C k – ε) scenario B: W err (t)= 2(C j – ε) scenario C: W err (t)= 2(C i – ε)

35 ε Case 2 ε ε ε τiτi τjτj τkτk τlτl t’t’ t ε T length Worst Case Temporal Wastage at t when the error burst hits more than one job (C l – ε) (C k – ε) (C j – ε) (C i – ε) W err (t) =2(C i – ε)+ ∑ (C m – ε), D m ≤ D i

36 Case 3 t’t’ tdkdk overhead at d k = overhead at t overhead at d k = overhead at d (k-1) Under EDF, the tasks released in the interval [t’,t] having a deadline greater than t are not hit by the error burst τjτj τiτi Worst Case Temporal Wastage at the absolute deadline of a job that is not hit by the error burst (abs. deadline of τ i ) d (k-1)

37 Worst Case Temporal Wastage: General Case W err (t) = Max Case 3 : WCTW at the previous absolute deadline If τ i is not hit by the error burst Case 1 : max{2(C k – ε)}, D k ≤ D i When the error burst hits only a single job Case 2 : 2(C i – ε) + ∑ (C k – ε), D k ≤ D i When the error burst hits more than one job t is the absolute deadline of a task τ i

38 FT-Feasibility: A Sufficient Condition DBF(t)T length t EtEt E t + DBF(t) ≤ t E t = W err (t) + T length

39 Problem Description Questions: ●How can we perform an FT-feasibility analysis for a given set of temporally redundant real-time tasks under a specified error burst length? ●If the real-time task set is not found to be FT-feasible, what is the lowest processor speed that guarantees its FT-feasibility under the error burst?

40 Resource Augmentation for FT-feasibility t DBF(t) deadline miss T length S = max{(DBF(t)+ W err (t) )/ (t -T length )} Is S bounded ? X + Y’ = W err (t) /S S ≤ 6 [ y ≥ 2 => T length ≤ D min /2 ] X + Y = W err (t) DBF(t)DBF(t)/S Put W err (t) = 2DBF(t) and DBF(t) = t S ≤ 3t/(t - T length ) S ≤ 3y/(y-1) [ y = t/ T length ]

41 Summary: Paper D  Fault tolerance feasibility analysis of real-time tasks ●A sufficient condition for FT-feasibility  Resource augmentation bounds for FT-feasibility ●Speed-up ≤ 6 if T length ≤ D min /2 ●If there exists a scheduling algorithm that can schedule a given set of real-time tasks on a uni-processor, under an error burst whose length is ≤ D min /2, then FT-EDF can schedule it, if given a processor that is 6 times faster.

42 Conclusions Main contributions Preemption control method using processor speed-up Offline method for periodic tasks Combined offline- online method for sporadic tasks Guarantee specified preemption behavior Bounds on the required processor speed-up Method to bound the preemption related overheads in the schedule A sufficient condition for FT-feasibility Bounds on the required processor speed-up that guarantees FT- feasibility Quantification of the sub-optimality of non- preemptive scheduling

43 Future Work ● Extensions to multi-processor scheduling -Non-preemption guarantees -FT-feasibility ●Utilization based tests -Non-preemptive scheduling -Fault Tolerance ● Contracts for component based real-time systems -Processor speed-up for non-preemption and FT-feasibility guarantees ●Notion of feasibility: augment the notion of feasibility with the extra resources required -E.g., Feasibility on m number of speed-s processor -Presence of runtime overheads

44 …indeed there is more to life than simply increasing its speed.

45 Thank You ! Questions ?


Download ppt "Resource Augmentation for Performance Guarantees in Embedded Real-time Systems Abhilash Thekkilakattil Licentiate Thesis Presentation Västerås, November."

Similar presentations


Ads by Google