Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat
Real-time Systems 2 web images
3 Real-time tasks Mapping of Events to Real-time Tasks web images
Sporadic Real-time Tasks 4 job1job2 Worst Case Execution Time Min. inter-arrival time (Period) Release time Relative deadline task release probability time Probabilistic task arrivals Task worst case execution time scales with processor frequency
Real-time Scheduling Guarantee task completions before their deadline 5 Non-preemptive Scheduling Low runtime overhead Increased blocking times Preemptive Scheduling Ability to achieve high utilization Preemption costs high priority low priority preemption cost blocking high priority low priority
6 Common Preemption Related Costs Scheduler related cost – Overhead involved in saving and retrieving the context of the preempted task Cache related preemption delays – Overhead involved in reloading cache lines – Vary with the point of preemption – Increased bus contention Pipeline related cost – Clear the pipeline upon preemption – Refill the pipeline upon resumption
Frequency Scaling in Real-time Systems 7 CPU frequency: Task takes less time to execute at higher frequencies changes the schedule behavior requires higher voltages P: Power consumption C: Effective capacitance V: Applied voltage F: CPU frequency Processor power consumption: minmax CPU frequency
What? 8 We examine the use of CPU frequency scaling to control preemption behavior in sporadic real-time task systems with probabilistic task releases.
Related work 9 Need for preemption elimination recognized Ramamritham-94, Burns-95, Ramaprasad-06 RM- more preemptions than EDF Buttazzo-05 Attribute re-assignment for FPS for preemption control Dobrin-04 Preemption aware scheduling algorithms Yang-09, Woonseok -04 Preemption threshold Scheduling Lamie-97, Saksena-00, Wang-99 Context switches and cache related preemption delays Lee-98, Schneider-00, Katcher-93 DVS: energy conservation- increase in preemptions Pillai-01,Aydin-04, Bini-09, Marinoni-07 Limited preemption scheduling Baruah-05, Bertogna -10
Methodology Overview 10 Offline phase Online phase inputs
Offline Phase Derive permitted relaxation to inter-arrival times Minimum inter-arrival times: worst case scenario Determines task set schedulability Relax the release times of jobs: using probabilities Most probable release time after the minimum inter-arrival time has elapsed Apply this relaxation at runtime for preemption control Permits for trade-offs 11
Online Phase Online preemption control algorithm: At runtime, find the earliest probable time instant of preemption Speed-up the busy period to avoid preemption Speed-up to maximum speed if preemption cannot be avoided - To keep the simplicity of the online algorithm 12
13 Example 13 TaskComputation time Inter-arrival time A15 B37 C A B C Original Fixed Priority Schedule
Offline Phase 14 TaskComputation time Time period Relaxation to min. inter- arrival times for threshold probability =0.20 Relaxation to min. inter- arrival times for threshold probability =0.24 A1513 B3713 C (time) Task release probability
Online Phase 15 TaskComputation time Inter-arrival time Relaxation A151 B371 C A B C C=1+3+3 = 7 t=6 (since we use release time probabilities) Speed=7/6 We speed-up to max. speed: simplicity earliest possible preemption point C=3 t=1 Speed=3/1
Evaluation 16 Processor Speed Power consumption per clock cycle (mW) No. of task sets1400 No. of tasks per task set 3-15 Algorithm usedUUniFast* LCM≤ 2000 Threshold probabilities 0.20 and 0.24 * E. Bini and G. C. Buttazzo, “Measuring the performance of schedulability tests,” Real-Time Systems, (time) Task release probability
Average Number of Preemptions 17 probability=0probability=0.20probability=0.24
Average Power Consumption 18 probability=0probability=0.20probability=0.24
No. of preemptions vs Energy 19 probability=0probability=0.20probability=0.24 probability=0probability=0.20probability=0.24
Conclusions Manipulate energy usage to control preemptive behavior in real-time schedules Trade-offs : energy vs. number of preemption Simplicity of the runtime algorithm: O(n) complexity Combined offline-online method: possibility to use more complex offline methods Effective: significant preemption reduction shown in simulations Limitations: increased energy consumption 20
Future work Resource augmentation for preemption control Processor speed-up for limited preemption scheduling (floating non-preemptive region scheduling) Bounds on the speed-up required to guarantee a required preemption behavior Contracts for preemption control using CPU frequency scaling Contract definition and negotiation in Component Based Real- time Systems 21
Thank you ! 22 Questions ?