Reducing the Number of Preemptions in Real-Time Systems Scheduling by CPU Frequency Scaling Abhilash Thekkilakattil, Anju S Pillai, Radu Dobrin, Sasikumar.

Slides:



Advertisements
Similar presentations
Multiprocessor Scheduling
Advertisements

Fakultät für informatik informatik 12 technische universität dortmund Classical scheduling algorithms for periodic systems Peter Marwedel TU Dortmund,
Feedback EDF Scheduling Exploiting Dynamic Voltage Scaling Yifan Zhu and Frank Mueller Department of Computer Science Center for Embedded Systems Research.
Simulation of Feedback Scheduling Dan Henriksson, Anton Cervin and Karl-Erik Årzén Department of Automatic Control.
Washington WASHINGTON UNIVERSITY IN ST LOUIS Real-Time: Periodic Tasks Fred Kuhns Applied Research Laboratory Computer Science Washington University.
Real Time Scheduling.
Pinwheel Scheduling for Power-Aware Real-Time Systems Gaurav Chitroda Komal Kasat Nalini Kumar.
Chapter 7 - Resource Access Protocols (Critical Sections) Protocols: No Preemptions During Critical Sections Once a job enters a critical section, it cannot.
Energy-efficient Task Scheduling in Heterogeneous Environment 2013/10/25.
Copyright © 2000, Daniel W. Lewis. All Rights Reserved. CHAPTER 8 SCHEDULING.
1 “Scheduling with Dynamic Voltage/Speed Adjustment Using Slack Reclamation In Multi-processor Real-Time Systems” Dakai Zhu, Rami Melhem, and Bruce Childers.
CS 149: Operating Systems February 3 Class Meeting
CPE555A: Real-Time Embedded Systems
Real- time Dynamic Voltage Scaling for Low- Power Embedded Operating Systems Written by P. Pillai and K.G. Shin Presented by Gaurav Saxena CSE 666 – Real.
CSE 522 Real-Time Scheduling (3)
Harini Ramaprasad, Frank Mueller North Carolina State University Center for Embedded Systems Research Tightening the Bounds on Feasible Preemption Points.
THE UNIVERSITY of TEHRAN Mitra Nasri Sanjoy Baruah Gerhard Fohler Mehdi Kargahi October 2014.
Preemptive Behavior Analysis and Improvement of Priority Scheduling Algorithms Xiaoying Wang Northeastern University China.
Wk 2 – Scheduling 1 CS502 Spring 2006 Scheduling The art and science of allocating the CPU and other resources to processes.
By Group: Ghassan Abdo Rayyashi Anas to’meh Supervised by Dr. Lo’ai Tawalbeh.
Power-aware Computing n Dramatic increases in computer power consumption: » Some processors now draw more than 100 watts » Memory power consumption is.
HARDWARE SUPPORT FOR REAL TIME OPERATING SYSTEMS A presentation by: Jake Swart.
VOLTAGE SCHEDULING HEURISTIC for REAL-TIME TASK GRAPHS D. Roychowdhury, I. Koren, C. M. Krishna University of Massachusetts, Amherst Y.-H. Lee Arizona.
Abhilash Thekkilakattil, Radu Dobrin, Sasikumar Punnekkat Mälardalen Real-time Research Center, Mälardalen University Västerås, Sweden Preemption Control.
A S CHEDULABILITY A NALYSIS FOR W EAKLY H ARD R EAL - T IME T ASKS IN P ARTITIONING S CHEDULING ON M ULTIPROCESSOR S YSTEMS Energy Reduction in Weakly.
Critical Power Slope Understanding the Runtime Effects of Frequency Scaling Akihiko Miyoshi, Charles Lefurgy, Eric Van Hensbergen Ram Rajamony Raj Rajkumar.
Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.
Quantifying the Sub-optimality of Non-preemptive Real-time Scheduling Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.
Real-Time Scheduling CS4730 Fall 2010 Dr. José M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
Multiprocessor Real-time Scheduling Jing Ma 马靖. Classification Partitioned Scheduling In the partitioned approach, the tasks are statically partitioned.
1 RTOS Design Some of the content of this set of slides is taken from the documentation existing on the FreeRTOS website
Abhilash Thekkilakattil, Radu Dobrin, Sasikumar Punnekkat Mälardalen Real-time Research Center, Mälardalen University Västerås, Sweden Towards Preemption.
Real-Time Scheduling CS4730 Fall 2010 Dr. José M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
The Global Limited Preemptive Earliest Deadline First Feasibility of Sporadic Real-time Tasks Abhilash Thekkilakattil, Sanjoy Baruah, Radu Dobrin and Sasikumar.
Hard Real-Time Scheduling for Low- Energy Using Stochastic Data and DVS Processors Flavius Gruian Department of Computer Science, Lund University Box 118.
6. Application mapping 6.1 Problem definition
NC STATE UNIVERSITY 1 Feedback EDF Scheduling w/ Async. DVS Switching on the IBM Embedded PowerPC 405 LP Frank Mueller North Carolina State University,
RTOS task scheduling models
Resource Augmentation for Performance Guarantees in Embedded Real-time Systems Abhilash Thekkilakattil Licentiate Thesis Presentation Västerås, November.
CSE 522 Real-Time Scheduling (2)
Mixed Criticality Systems: Beyond Transient Faults Abhilash Thekkilakattil, Alan Burns, Radu Dobrin and Sasikumar Punnekkat.
1 Real-Time Scheduling. 2Today Operating System task scheduling –Traditional (non-real-time) scheduling –Real-time scheduling.
Introduction to Embedded Systems Rabie A. Ramadan 5.
Multiprocessor Fixed Priority Scheduling with Limited Preemptions Abhilash Thekkilakattil, Rob Davis, Radu Dobrin, Sasikumar Punnekkat and Marko Bertogna.
CSCI1600: Embedded and Real Time Software Lecture 23: Real Time Scheduling I Steven Reiss, Fall 2015.
Yifan Zhu, Frank Mueller North Carolina State University Center for Efficient, Secure and Reliable Computing DVSleak: Combining Leakage Reduction and Voltage.
CprE 458/558: Real-Time Systems (G. Manimaran)1 Energy Aware Real Time Systems - Scheduling algorithms Acknowledgement: G. Sudha Anil Kumar Real Time Computing.
Undergraduate course on Real-time Systems Linköping University TDDD07 Real-time Systems Lecture 2: Scheduling II Simin Nadjm-Tehrani Real-time Systems.
Determining Optimal Processor Speeds for Periodic Real-Time Tasks with Different Power Characteristics H. Aydın, R. Melhem, D. Mossé, P.M. Alvarez University.
Scheduling.
Distributed Process Scheduling- Real Time Scheduling Csc8320(Fall 2013)
Real-Time Operating Systems RTOS For Embedded systems.
Embedded System Scheduling
Reducing the Number of Preemptions in Real-Time Systems Scheduling by CPU Frequency Scaling Abhilash Thekkilakattil, Anju S Pillai, Radu Dobrin, Sasikumar.
EEE Embedded Systems Design Process in Operating Systems 서강대학교 전자공학과
Networks and Operating Systems: Exercise Session 2
Wayne Wolf Dept. of EE Princeton University
EEE 6494 Embedded Systems Design
Chapter 8 – Processor Scheduling
Chapter 6: CPU Scheduling
Reconfigurable Hardware Scheduler for RTS
Real Time Scheduling Mrs. K.M. Sanghavi.
Limited-Preemption Scheduling of Sporadic Tasks Systems
Processes and operating systems
Real-Time Process Scheduling Concepts, Design and Implementations
FAST: Frequency-Aware Static Timing Analysis
Ch 4. Periodic Task Scheduling
Real-Time Process Scheduling Concepts, Design and Implementations
Presentation transcript:

Reducing the Number of Preemptions in Real-Time Systems Scheduling by CPU Frequency Scaling Abhilash Thekkilakattil, Anju S Pillai, Radu Dobrin, Sasikumar Punnekkat

Real-time Scheduling Paradigms Non-preemptive Low runtime overhead Increased blocking times Preemptive Ability to achieve high utilization Preemption costs How to take advantage of both paradigms? Dynamic Voltage (and Frequency) Scaling Speed up or slow down task executions Supported by most modern processors Traditionally used to slow down task executions : energy conservation Applying frequency scaling for preemption control Our work:

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 Energy consumption – E.g., off-chip accesses due to cache pollution: times increase in energy

Limitations of the existing works: 1. May require change of task attributes 2. May require changes in the scheduler 3. Incur potentially infeasible costs Related work Need for preemption elimination recognized Ramamritham-94, Burns-95, Ramaprasad-06 RM- more preemptions than EDF Buttazzo-05 Delay preemption, force simultaneous release of tasks Dobrin-04 Preemption aware scheduling algorithms Yang-09, Woonseok -04 Preemption threshold Scheduling 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

Our approach We use CPU frequency scaling to control preemption behavior in fixed priority schedulers

Step 1: Offline preemption identification Step 2: Preemption elimination a. Calculate the minimum frequency required to eliminate the preemption b. Analyze the effect of preemption elimination on the rest of the schedule Recalculate start and finish times of task instances Step 3: Iterate until no more preemptions can be eliminated Proposed methodology-overview

Classification of preemptions Initial Preemptions –Occur if all tasks execute for WCET –Identified offline Task A (high priority) Task B (low priority)

Classification of preemptions Potential Preemptions –Additional preemptions that may occur when tasks execute for less than WCET –Identified offline Task A (highest priority) Task B Task C (lowest priority) B executes for less than WCET Finish time of B and release time (and start time) of A Finish time of A

Task A (high priority) Task B (low priority) Condition 1. A has higher priority than B Condition 2. A is released after release of B Condition 3. A starts executing after start of B Condition 4. B finishes its execution after the release of A AND Step 1: Offline preemption identification Step 2: Preemption elimination a. Calculate the minimum frequency required to eliminate the preemption b. Analyze the effect of preemption elimination on the rest of the schedule Step 3: Iterate until no more preemptions can be eliminated

Task A (high priority) Task B (low priority) Condition 1. A has higher priority than B Condition 2. A is released after B Condition 3. A starts executing after start of B Condition 4. B finishes its execution after the release of A C new Execution time is inversely proportional to clock frequency C old α 1/F old C new α 1/F new F new = (C old / C new ) F old Step 1: Offline preemption identification Step 2: Preemption elimination a. Calculate the minimum frequency required to eliminate the preemption b. Analyze the effect of preemption elimination on the rest of the schedule Step 3: Iterate until no more preemptions can be eliminated

Task A (highest priority) Task B Task C (lowest priority) Task A (highest priority) Task B Task C (lowest priority) Step 1: Offline preemption identification Step 2: Preemption elimination a. Calculate the minimum frequency required to eliminate the preemption b. Analyze the effect of preemption elimination on the rest of the schedule Step 3: Iterate until no more preemptions can be eliminated

Recalculate start times Start time = latest finish time among all higher priority tasks CASE 1: There are no higher priority tasks executing when a task is released CASE 2: There are higher priority tasks executing when a task is released Task A (highest priority) Task B Task C (lowest priority) Task B Task C (lowest priority) Task A (highest priority) Finish time Start time = release time Step 1: Offline preemption identification Step 2: Preemption elimination a. Calculate the minimum frequency required to eliminate the preemption b. Analyze the effect of preemption elimination on the rest of the schedule Step 3: Iterate until no more preemptions can be eliminated

Task A (highest priority) Task B Task C Task D Task E (lowest priority) Start TimeInterference + + Execution timeFinish time = Response time analysis at instance level Recalculate finish times Step 1: Offline preemption identification Step 2: Preemption elimination a. Calculate the minimum frequency required to eliminate the preemption b. Analyze the effect of preemption elimination on the rest of the schedule Step 3: Iterate until no more preemptions can be eliminated

Minimizing the number of preemptions: NP hard problem –Order of preemption elimination matters! –In this work we use heuristics Heuristics evaluated – Highest Priority First (HPF) – Lowest Priority First (LPF) – First Occurring Preemption First (FOPF) – Last Occurring Preemption First (LOPF) Step 1: Offline preemption identification Step 2: Preemption elimination a. Calculate the minimum frequency required to eliminate the preemption b. Analyze the effect of preemption elimination on the rest of the schedule Step 3: Iterate until no more preemptions can be eliminated

Example C=1C=4 D starts earlier C=1 C= Task A B C D Rate monotonic schedule Order of elimination: First Occurring Preemption First ModesM1M2M3 Frequency (Hz) F C1 =6F 1 =600 HzF C1 =1.5F 1 =150 Hz F D1 =4F 1 =400 Hz F C2 =3F 1 =300 Hz Exec. TimePeriod Task A100 B ---- C D Task instance frequencies (Hz) Processor modes

Simulations Task Set – UUniFast 1 algorithm – 60% to 100% utilization –1000 task sets – 5 – 15 tasks – LCM of task periods <= 1500 Processor – Continuous frequency modes – Ratio of maximum to minimum frequency is 10 : 6 – Initially runs at the minimum frequency – Four ranges of power consumption: can be easily generalized Experiments –Based on task priority order (HPF,LPF) –Based on the order of occurrence (FOPF,LOPF) 1 Bini and Buttazzo, Measuring the Performance of Schedulability Tests, Real-Time Systems, 2005

Preliminary results-initial preemptions 55% preemption reduction after elimination Before eliminationHighest Priority First (HPF) Lowest Priority First (LPF) First Occurring Preemption First (FOPF) Last Occurring Preemption First (LOPF) Initial preemptions (Avg. no.)

Preliminary results-potential preemptions 27% preemption reduction after elimination LOPF and LPF fares slightly better Before eliminationHighest Priority First (HPF) Lowest Priority First (LPF) First Occurring Preemption First (FOPF) Last Occurring Preemption First (LOPF) Potential preemptions (Avg. no.)

Conclusions Method to control preemption behavior in real time systems using CPU frequency scaling –Offline –Provides for trade-off between preemptions and energy consumption –Requires no modifications to the scheduler –Required no modifications to task attributes –Main element of cost: energy (showed 4.2 times increase in simulations)

On-going efforts Extensions to sporadic task model Combined offline/online approach –Reduce task execution speed –Could be a better alternative for preemption control –Compensates the energy increase due to speeding up of task executions Optimization – Minimize the number of preemptions – Minimize overall energy consumption – Trade-offs

Questions or Suggestions ? Thank You