250 likes | 366 Vues
Energy-Aware Modeling and Scheduling of Real-Time Tasks for Dynamic Voltage Scaling. Xiliang Zhong and Cheng-Zhong Xu Dept. of Electrical & Computer Engg. Wayne State University Detroit, Michigan http://www.cic.eng.wayne.edu. Outline. Introduction and Related Work
E N D
Energy-Aware Modeling and Scheduling of Real-Time Tasks for Dynamic Voltage Scaling Xiliang Zhong and Cheng-Zhong Xu Dept. of Electrical & Computer Engg. Wayne State University Detroit, Michigan http://www.cic.eng.wayne.edu
Outline • Introduction and Related Work • A Filtering Model for DVS • Time-invariant Scaling • Time-variant Scaling • Statistical Deadline Guarantee • Evaluation • Conclusion
Motivation • Mobile/Embedded devices power critical • Energy-Performance tradeoff • Processor speed designed for peak performance • Slowdown the processor when not fully utilized (DVS) • Challenges • Maximize energy saving while providing deadline guarantee • Real-time tasks could be periodic/aperiodic w/ highly variable execution time • Aperiodic tasks have irregular release times, which calls for online decision making
Related Work • Intensive studies for periodical tasks • Algorithms for aperiodic tasks • Offline (Yao et al’95, Quan & Hu’01) • Online: all timing information known only after job releases • Soft real-time: improve responsiveness (Aydin & Yang’04) • Occasionally uncontrollable deadline misses (Sinha & Chakrabarty’01) • Hard real-time w/complex admission control (Hong et al ’98) • Maximize energy saving w/ frequency scaling(Qadi et al ’03, DVSST) • On-line slack management for a general input (Lee & Shin ’04,OLDVS) • Objectives of this paper: • Hard/statistical deadline guarantee for general input w/o assumptions of task periodicity • Unified, online solutions for both WCET based scheduling and slack management
Independent tasks, preemptive w/ dynamic priorities Job releases (requests) to system are characterized by a compound process in a discrete time domain: wi(t)is the size (WCET) of ith jobs arrived during time [t-1,t) n(t) stands for number of jobs arrived, each w/deadline td Task Model Input arrivals w1(1) w1(2) w2(3) … time 2 1 0
System Model • Processor Model • Support a continuous range of speed levels • Energy Model • t: scheduling time slot, f(t): speed at time [t, t+1) • l(t): load, #cycle allocated to all jobs during [t, t+1) • P(l(t)): power as a function of load • E(S): energy consumed according to a schedule S
Request Size Output load Job Arrivals g s h A Filtering Model of Speed Scaling • Allocation function denotes the # cycles allocated to one job wi(t) during [t, t+1) • Decomposition of allocation function • g(), the impact of job sizes (WCETs) on scheduling • h(), scaling function • s(), the load’ feedback to scheduling
A Filtering Model (cont.) • Load Function l(t) is a sum of allocation to all jobs • Each job should be finished in td time g(wi(t))=wi(t) • Non-adaptive to load s(l(t)) = 1
A Filtering Model (cont.) • The load function becomes a convolution of compounded input request process and scaling function, • Scaling function h(t): Portion of resource allocated at each scheduling epoch from the arrival time ts to finish time ts+td • Design of scaling algorithm in a fitlerng system
Time-Invariant Scheduling • Treat h(t) as a time-invariant scaling function • The optimal policy is to find an allocation where • The optimality is determined by the covariance matrix Ω of the input process w(t) in the order of deadline td • The optimization has a unique, closed form solution
Example Solutions with Different Input Auto-Correlations of Traffic • Two multimedia traffic patterns (Krunz’00) • Shifted Exponential Scene-length Distribution (ACFExp) • Subgeometric scene-length distribution (ACFSubgeo) • Fractional Gaussian Noise (FGN) process with Hurst para. H=0.89 • Simpsons MPEG Video Trace of 20,000 frames
Example Solution (td=10) • Higher degree of input autocorrelation has a more convexed scaling function • The uniform distributed allocation is a generalization of several existing algorithms for • Periodic tasks • Sporadic tasks • Aperiodic tasks
Running queue 1 l1(t) Dispatcher Input jobs Running queue 2 Output load l(t) + l2(t) … Running queue td ltd(t) Time-Variant Scaling • Energy consumption can be reduced if the scaling function h(t) is adaptive in response to change of input load • Make td runnable queues. Jobs with deadline j are put to queue j
Time-Variant Scaling • Minimize energy consumption is to subject to: where qj(t) is the backlog of queue j at time t. • The optimization has a unique solution: Resource cap of queue j at time t Committed resource for jobs in queue j at time t
S5(0)=11 L(t)=0 12 9 7 5 Illustration • Determine cap of queue 5 at time 0: S5(0) load • First determine current committed resource • Distribute the job as late as possible • The job is distributed to early slots as its size increases 0 1 2 3 4 5 time slot
Example Solution for a Sporadic Task InputJ(WCET): J1(1) released at 0, 5, J2(2) at 1, 7, J3 (1) at 3, 9. Deadline of all jobs: 4. Ji,j: jth instance of task i 1. Schduling using EDF w/o scaling 2. Schduling using the Time Variant Scaling Using a square energy function: 35% more energy saving compared to EDF. 8% to DVSST
Statistical Deadline Guarantee • Worst case scenario schedulability test • Conservative • pi: minimum interarrival • Statistical guarantee • Overload probability v=prob(l(t) > fmax) cumulative probability 1 v F(x) fmax worst case f
cumulative probability 1 v F(x) b1 b2 bmin bmax br-1 f’max Statistical Deadline Guarantee (cont.) • Load tail distribution • A general bound w/ load mean and variance • Tight bounds based on load distribution • Exact output distribution if input distribution known • Estimate output distribution using a histogram fmax
Evaluation • Objectives • Effectiveness in energy savings • Effectiveness of the deadline miss bound • Scheduling based on WCET • No-DVS: run jobs with the maximum speed. • Offline: Offline optimal algorithm of Yao:95 et a. • DVSST: On-line algorithm for sporadic tasks Qadi:RTSS03 et al. • TimeInvar: Time-invariant voltage scaling. • TimeVar: Time-variant voltage scaling. • On-line slack management • DVSST+CC (Cycle-conserving EDF): Worst case schedule using DVSST with the reclaiming algorithm of Pillai and Shin (SOSP01). • TimeVar+OLDVS: The time-variant voltage scaling and the reclaiming algorithm of Lee and Shin:RTSS2004. • TimeVar+TimeVar: A unified solution.
11% Energy Savings • Energy consumption with the Robotic Highway Safety Marker application; A scenario in which robot keeps moving DVSST TimeVariant Offline • TimeVar is energy-efficient, close to Offline (5%); 7-11% better than DVSST
Energy Savings w/ Workload Variation • #tasks=30; Interarrival ~ exp(50 ms) WCET ~ n(100, 10)K • Workload variation characterized by actual execution time over worst case (BCET/WCET) TimeVariant adapts with workload variation effectively
Computation Speed Configuration Required speed (MHz) • Target deadline guarantee: 99% Mean Interarrival time (ms) • Computation requirement based on a general bound is better than worst case with mean interarrivals > 60 ms • Tight bounds reduce the computation speed in half as interarrivals > 40 ms
No deadline misses under bound derived based on a general input: 100MHz Statistics of TimeVar/TimeInvar under a tight bound: 40MHz Overload handling: reject new jobs or serve unfinished jobs in a best-effort mode Target deadline guarantee 99% Statistical Deadline Guarantee Deadline miss rate is effectively bounded
Conclusion • Voltage/Speed scaling for a general task model • A Filtering Model for DVS • Two online policies to minimize energy usage • Time-invariant : A generalization of several existing approaches • Time-variant : Optimal in the sense it is online w/o future task timing information. Also effective for on-line slack management • Statistical deadline guarantee based on computation speed configuration. • Future work • System-wide energy savings, e.g., wireless communication and its interaction with CPU
Energy-Aware Modeling and Scheduling of Real-Time Tasks for Dynamic Voltage Scaling Thank you!