230 likes | 359 Views
ParaScale : Exploiting Parametric Timing Analysis for Real-Time Schedulers and Dynamic Voltage Scaling.
E N D
ParaScale : Exploiting Parametric Timing Analysis for Real-Time Schedulers and Dynamic Voltage Scaling Sibin Mohan1Frank Mueller1,William Hawkins2, Michael Root3, Christopher Healy3, David Whalley41 : North Carolina State University, Centre for Embedded Systems Research2 : University of Illinois, Urbana-Champaign, 3 : Furman University, 4 : Florida State University
Outline • Motivation • Static Timing Analysis • Parametric Timing Analysis • Using Parametric Timing Analysis • Framework • Experiments and Results • Conclusion Sibin Mohan : Real-Time Systems Symposium 2005
Motivation • Worst-case execution time (wcet) obtained by • Static timing analysis • Dynamic timing methods (proven unsafe) • Static Timing Analysis • Upper limits on loop bounds known at compile time • Results in large overestimations • Provides single numeric value • Places limits on real-time designers • Type of code that may be used in tasks Sibin Mohan : Real-Time Systems Symposium 2005
Value must be known at compile time Static Timing Analysis for( i = 0 ; i < n ; ++i ) Loop Body ; Consider the following piece of code… Result : WCET = 1000 cycles (say) Sibin Mohan : Real-Time Systems Symposium 2005
Parametric Timing Analysis • Calculate : formula /closed form for WCET • Formula depends on number of loop iterations • Evaluated at run-time • Results used for… • scheduling decisions • power savings • etc. Sibin Mohan : Real-Time Systems Symposium 2005
Value must be known prior to loop entry Number of cycles to execute Loop Body for above example Parametric Timing Analysis (contd.) for( i = 0 ; i < n ; ++i ) Loop Body ; For the previous example… Result : WCET = 102 * n (say) Sibin Mohan : Real-Time Systems Symposium 2005
Parametric Timing Analysis (contd.) for( i = 0 ; i < n ; ++i ) Loop Body ; In practice… Call IntraTaskScheduler(evaluate_loop_k(n)) ; int evaluate_loop_k( int loop_bound){ return ( 102 * loop_bound ) ; } Sibin Mohan : Real-Time Systems Symposium 2005
C source file Parametric Timing Analyzer C source file annotated with Parametric Evaluation functions Send Annotated C source file to Parametric Timing Analyzer YES Has Parametric formula changed? NO Use Annotated C source file for execution on Simulator Flow of Parametric Timing Analysis Sibin Mohan : Real-Time Systems Symposium 2005
Insert Parametric Formulae into Task Code Timing analysis of function with parametric loop Loop analyzed and parametric evaluation function generated Numerical Analysis of generated function complete Timing analysis if function with parametric loop complete Sibin Mohan : Real-Time Systems Symposium 2005
Use of Parametric Timing Analysis • Evaluate parametric expressions at run-time • Based on actual loop bounds at run-time • Transfer control to dynamic scheduler • Newly-calculated WCET sent to scheduler • Calculate savings in execution time • Savings exploited by scheduler to… • admit additional tasks • reduce operating frequency/voltage save power Sibin Mohan : Real-Time Systems Symposium 2005
Unique advantages of our work • Exploit early knowledge of execution of tasks • Especially knowledge about future execution of loops • Tightly bound execution for remainder of task • Intra-task DVS algorithm slows down processor • As execution proceeds processor slowed down further • Saves power! • Other DVS algorithms: • Task execution sped up as deadlines approach Sibin Mohan : Real-Time Systems Symposium 2005
Instruction/data info assembly Numeric WCET Bound C Source Files SimpleScalar Simulator Parametric Timing Analyzer Numeric Timing Analyzer C Source Files Wattch Power Model gcc PISA Compiler p-compiler Scheduler C Source Files C Source Files & Parametric Functions C Source Files & Parametric Functions C Source Files & Parametric Functions Energy/power values Framework Sibin Mohan : Real-Time Systems Symposium 2005
Framework (contd.) • p-compiler • Works on assembly files as input • Extracts information about instructions and data • Timing Analyzers • Numeric : provides constant, numeric WCET bound • Parametric : provides parametric formulae as WCET • Schedulers • Frequency/Voltage lowered during execution • Set to levels for last executing task instance • SimpleScalar simulation framework • Capable of handling multiple threads of execution • Can be configured for simple processor, SMT, CMP, etc. Sibin Mohan : Real-Time Systems Symposium 2005
Experiments * Parametric Execution Time • Energy measurement techniques… • Perfect Clock Gating (PCG) • Perfect Clock Gating with Leakage (PCGL) • ParaScale • Our combined intra-task and static inter-task DVS Sibin Mohan : Real-Time Systems Symposium 2005
Energy Consumption : 2x, PCG Energy consumptions, assuming no leakage, for • various utilizations • DVS Schemes Least consumption: ParaScale (for all cases)
Energy Consumption : 2x, PCGL Energy consumptions, leakage considered, for • various utilizations • DVS Schemes Least consumption: ParaScale (for all cases)
Energy Consumption: 10x, PCG Energy consumptions, assuming no leakage, for • various utilizations and DVS Schemes for 10x • Least Consumption : ParaScale Overall savings are lower due to greater slack
Energy Consumption: 10x, PCGL Energy consumptions, leakage considered, for • various utilizations and DVS Schemes for 10x • Least Consumption : ParaScale Overall savings are lower due to greater slack Sibin Mohan : Real-Time Systems Symposium 2005
Energy Consumption trends (PCG) Energy consumption (hence savings) for ParaScale: • Drops as ratio of WCET/PET is increased • Due to greater slack available in the system
Energy Consumption trends (PCGL) Energy consumption affected by • Leakage power prevalent in system • Relative savings lower
Scheduler Overhead: Utilization 50% • Scheduler overheads greatest for ParaScale • Power savings still significant • Due to lowering of voltage/frequency for schedulers
Conclusion • Fixed-point approach • To embed parametric formulae • Bounds WCET of application + parametric code • Provide lower WCET bounds during execution • Prior to entry into loops • Quantify savings in terms of • Power savings • ParaScale: combined inter and intra-task DVS • Savings of 66-80% ! • Power savings over DVS-oblivious techniques. • Mainly due to knowledge about: • Past execution • Future execution due to parametric formulae
Thank You ! Questions ? Sibin Mohan : Real-Time Systems Symposium 2005