Download presentation
Presentation is loading. Please wait.
Published byMiranda Dawson Modified over 8 years ago
1
Determining Optimal Processor Speeds for Periodic Real-Time Tasks with Different Power Characteristics H. Aydın, R. Melhem, D. Mossé, P.M. Alvarez University of Pittsburgh ECRTS’2001
2
Motivation Power Management: Crucial for devices with scarce power resources (Mobile, embedded..) Variable Voltage Scheduling: Adjust the supply voltage and the frequency (hence, the speed) of the CPU on-the-fly to obtain power savings.
3
Product of CPU speed, S, and allocated time, t = # of cycles, C. Variable Voltage Scheduling Example: Assume that power consumption, P, is proportional to the square of the execution speed, S. Execution power energy time consumed 1 64 64 2 16 32 3 7 21 4 4 16 5 2.5 12.5 The speed / power function is a strictly convex function: Prospects of saving energy at the expense of increased latency. S t
4
RT Variable Voltage Scheduling Start time deadline Exec. at max speed Exec. at min speed Exec. at opt. speed time Given a deadline a worst case workload a capability to adjust the processor speed We can find the speed to meet the deadline, and minimize energy consumption Clock rate Power, P and Energy, E Speed P(S) S min S max E(S)
5
Variable Voltage Scheduling versus Reward-Based Scheduling Find CPU allocations per task to maximize total reward while meeting the deadlines. t_min t_max Reward Additional CPU time t i Reward increases beyond t_min in a convex manner.
6
Variable Voltage Scheduling versus Reward-Based Scheduling Energy savings are increasing beyond t_min in a concave manner. Find optimal CPU allocations per task to maximize the energy savings while meeting the deadlines. Note that, for a fixed computation (# of cycles, C), more time, t, means smaller speed, S. t_min Max CPU Speed Min CPU Speed t_max Energy consumption Additional CPU time t i
7
Example: Start time deadline Task 1 Three tasks with C 1 = C 2 = C 3, P i (S) = a S 2, for task i, energy consumed by task i is E i = a / t i. D time D/3 E P(S) S min S max E(S) S Task 2 Task 3 t1t1 t2t2 t 1 = t 2 = t 3 minimizes total energy t3t3 When all tasks consume the same power, total energy is minimized if all tasks run at the same speed (allocated same CPU time)
8
Task-level Power Characteristics At a given voltage/speed level, the power consumption is proportional to the effective switched capacitance of the running task. The power - speed function is highly dependent on: –Locality of reference exhibited by the task –On-chip units actively being used (FPU, DSP, …) –Effects of other power management techniques To obtain full benefit through Variable Voltage Scheduling, different power/speed curves for different tasks should be considered.
9
Example: Start time deadline Three tasks with C 1 = C 2 = C 3, P i (S) = a i S 2, for task i, energy consumed by task i is E i = a i / t i. time E D/3 D t1t1 t2t2 t3t3 t 1 = t 2 = t 3 does not minimize total energy When tasks consume different powers, total energy is not minimized if all tasks run at the same speed (allocated same CPU time)
10
Minimizing energy consumption Start time deadline The problem is to find S i, i=1, …, n, such that to Note that We solved this optimization problem, consequently developing a solution for arbitrary convex power functions. Algorithm complexity: O(n 2 log n) D
11
PERIODIC VARIABLE VOLTAGE SCHEDULING MODEL A set of n periodic tasks Task i has: –the period T i –the worst-case number of instruction cycles, C i –the power consumption function P i (S), where S is the processor speed (0 <= S min <= S <= S max = 1) PROBLEM: Determine the schedule and speed assignments for every instance of each task during hyperperiod T (least common multiple of all the periods), so as to: –Minimize the total energy consumed by the system –Meet all the deadlines.
12
Optimal Speed Assignments Power consumption curve is convex: –No need to change speed during the lifetime an instance –No need to change speed at different instances of a task Identical power consumption functions Use the uniform speed S = Utilization = C i / T i Non-identical power functions lead to different optimal speed assignments for different tasks! –High-power tasks should be executed with lower speeds
13
Optimal Speed Assignments Convex minimization problem Solution sketch: –Consider only equality constraint: Problem OPT –Consider only equality and lower bound constraints: Problem OPT-L –Adjust solutions using properties derived from Kuhn-Tucker conditions –O(n 2 log n) solution exists
14
Scheduling with Optimal Speeds Theorem: Any hard real-time scheduling policy which can fully utilize the processor can be used to obtain a feasible schedule with the optimal speed assignments. –Earliest Deadline First –Least Laxity First –Rate Monotonic with Harmonic Periods Implementation: The optimal speed S i becomes part of the process state / descriptor. CPU speed is dynamically modified at context-switch time (overhead of changing speed: 100 - 1000 clock cycles)
15
Experimental results Evaluated experimentally the improvement over the uniform slow down of all the tasks (the optimal scheme for identical power functions). Assumed that P i (S i ) = i S i 3 Considered k = ( max / min ) Bimodal distribution Uniform distribution 0 1 2 3 4 5 6 7 8 k 35 30 25 20 15 10 5 % energy improvement
16
Conclusion To obtain the full benefit of Variable Voltage Scheduling, the power characteristics must be considered at the task- level. Optimal speed assignments can be computed efficiently for the periodic model. Earliest Deadline First policy can be used to produce a feasible schedule.
17
Future Work Consider variations in the actual workload. Develop dynamic reclaiming techniques while still guaranteeing the feasibility. Address the precision (reward) and the energy issues simultaneously.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.