640 likes | 790 Views
Energy-Efficient System Virtualization for Mobile and Embedded Systems. 2013/07/10. Outline. Project overview System design Power model Offline energy-efficient task scheduling Simulation and experimental results Online energy-efficient task scheduling Simulation results
E N D
Energy-Efficient System Virtualization for Mobile and Embedded Systems 2013/07/10
Outline • Project overview • System design • Power model • Offline energy-efficient task scheduling • Simulation and experimental results • Online energy-efficient task scheduling • Simulation results • Plan for the next six months
Outline • Project overview • System design • Power model • Offline energy-efficient task scheduling • Simulation and experimental results • Online energy-efficient task scheduling • Simulation results • Plan for the next six months
Motivation • Mobile devices have become an important tool in our daily life. • Mobile virtualization enables a device to run multiple OS or virtual machines simultaneously. • Since the energy and resources of a mobile device is limited, how to achieve energy-efficient while keeping performance is an important issue.
Goal • Energy-efficient mobile virtualization system • Based on microkernel • Energy-efficient task scheduling
Energy-Efficient Task Scheduling • The scheduler of microkernel can see every tasks from different VMs. • Can make better scheduling decisions. • We have been working on how to derive an energy efficient scheduling algorithm. • Decide the task execution sequence. • Decide CPU processing rate for each task.
Outline • Project overview • System design • Power model • Offline energy-efficient task scheduling • Simulation and experimental results • Online energy-efficient task scheduling • Simulation results • Plan for the next six months
Outline • Project overview • System design • Power model • Offline energy-efficient task scheduling • Simulation and experimental results • Online energy-efficient task scheduling • Simulation results • Plan for the next six months
Models • Taski • Tasks are composed by many instructions. • Tasks are non-preemptive. • Tasks can be rescheduled in different orders. • Processing rate pi • Core can works under different processing rates. • No rate change while processing a task.
Power Model • Task’s Energy Consumptionεk=(pk)3tktk =Bk/ pk • εk : expected energy consumption(Joules) • pk: actual execution rate • tk: actual execution time • Bk: task’s number of instructions • From the above two equations: • εk=Bk(pk)2
Simplification • Assume there are only two processing rates • pH and pL • pH = 2* pL • Changing processing rate will affect both execution time and energy consumption.
Cost Function • Ci is the cost for executing Taski. • Tj: The execution time of Taskj • εi: The energy consumption of Taski • H :The cost ratio between time and energy. • Bi : Task’s number of instructions • “The cost of a task depends on how long it has to wait and the energy consumed by this task.”
Outline • Project overview • System design • Power model • Offline energy-efficient task scheduling • Simulation and experimental results • Online energy-efficient task scheduling • Simulation results • Plan for the next six months
Scenarios • According to different environment and task characteristic, we can have different scenarios. • Environment • Single core • Multi-core • Task characteristic • With deadline constraint • Without deadline
Scenario 1 • Each task has a deadline. • Single-core environment. • “Find out how to schedule a set of tasks that satisfy a given time and energy constraints.“ • NP-Complete
Proof of NP-Completeness • Assume there are n+1 tasks • Using pL, • Given • Time :2.5T • Energy :6.5ε
Proof of NP-C(Cont.) • The n+1th task must run with pH • 1.5T, 2.5 ε left for the other n tasks. • The rest n tasks • Half pH, half pL • This can be reduced to a partition problem. • NP-C.
Solution • Dynamic Programming • Assume there are only two processing rates • E(i,t) : the energy consumption of finishing i tasks before time t. • Recursively find the minimum energy consumption.
Scenario 2 • No deadline constraint. • Single core environment. • Find an execution sequence that minimize the overall cost. • Costi= • ΣCosti
Some Lemmas • Lemma 1 • Assume that the processing rate of executing each task remain unchanged, shorter task first scheduling leads to the minimum cost. • Lemma 2 • If a task is executed using a higher processing rate, the number of tasks waiting after it must be increased to compensate the extra costs.(?)
Theorem • Theorem 1 • There exists an optimal solution with the minimum cost in which the tasks are in non-decreasing order of execution time.
Algorithm • 1.Sort the tasks by their execution time in ascending order. • 2.From the last task to the first, do • 3. check if increasing the processing rate of executing this task benefits the overall cost. • 4. if yes, increase its processing rate • 5.loop
Scenario 3 • No deadline constraint. • Multi-core environment. • Decides which task goes to which core
Example • 1. waiting time = (0+4+8+12)+(0+8) = 32 • 2. waiting time = (0+4+8)+(0+4+8) = 24 4 4 4 4 8 8 4 4 8 4 4 8
Scheduling for Multi-cores • Shorted Queue First with Ascending Task Order (SQF-ATO). • Sort the tasks in non-decreasing order. • Repeat until all tasks are assigned. Assign the first task in the shorter queue. • Apply frequency tuning for single core algorithm to each queue.
Outline • Project overview • System design • Power model • Offline energy-efficient task scheduling • Simulation and experimental results • Online energy-efficient task scheduling • Simulation results • Plan for the next six months
Experimental Environment • Run fiasco microkernel on x86 machine • 4 cores • 12 Processing rates • From 1.6GHz to 3.06 GHz • Benchmark: MiBench • 16 synthesis workloads, each with different execution time. • From 1 seconds to 17 minutes using 1.6GHz. • Power meter
Simulation • We have done the following simulations: • Use the proposed heuristic to find a schedule plan, and estimate its cost. • Use dynamic programming to find the schedule plan with the minimum cost. • Find the schedule plan that only consider time as cost. • Find the schedule plan that only consider energy consumption as cost. • Two processing rates: 1.6 and 3.0GHz
Simulation Results • The schedule plan from SQF-ATOis the same as optimal solution.
Experiment I • Execute the schedule plans from simulation, and measure the actual energy consumption and waiting time. • Schedule plans: • SQF-ATO • Time-only • Energy-only
Experiment Results • Comparison between simulation and experimental results
Comparison • Detail of SQF-ATO schedule plan
Summary of Experiment 1 • The experimental result is quiet similar to the simulation results. • Discrepancy within 5%. • Consider only one metric(time or energy consumption) results in lower cost, but the other metric will greatly suffers.
Experiment 2 • Compare the cost between SQF-ATO and the baseline scheduling metrics of microkernel. • Baseline: FIFO without dynamic frequency scaling.
Summary of Experiment 2 • Our heuristic improves the overall cost at about 26%. • Mostly from energy consumption(48%)
Experiment 3 • Extend the frequency choices from 2 to 5. • 1.6GHz • 2.0GHz • 2.4GHz • 2.8GHz • 3.0GHz
Summary of Experiment 3 • Using the same scheduling algorithm(SQF-ATO), the cost of five frequency choices is lower the cost of two frequency choices • In this experiment, the largest frequency used is 2.4GHz instead of 3.0GHz.
Outline • Project overview • System design • Power model • Offline energy-efficient task scheduling • Simulation and experimental results • Online energy-efficient task scheduling • Simulation results • Plan for the next six months
Scenarios • Task sets are dynamic. • Different types of tasks. • Interactive task • Computation task • Background task • Schedule tasks and adjust core frequency every fixed time interval. • U: interval length.