Top Banner
Energy-Efficient System Virtualization for Mobile and Embedded Systems 2013/07/10
63

Energy-Efficient System Virtualization for Mobile and Embedded Systems

Jan 02, 2016

Download

Documents

laith-rhodes

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 - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript

1

Energy-Efficient System Virtualization for Mobile and Embedded Systems2013/07/10OutlineProject overviewSystem designPower modelOffline energy-efficient task schedulingSimulation and experimental resultsOnline energy-efficient task schedulingSimulation resultsPlan for the next six monthsOutlineProject overviewSystem designPower modelOffline energy-efficient task schedulingSimulation and experimental resultsOnline energy-efficient task schedulingSimulation resultsPlan for the next six monthsMotivationMobile 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.Windows PhoneAndroidiOS4GoalEnergy-efficient mobile virtualization systemBased on microkernelEnergy-efficient task scheduling

microkernelhypervisor/microkernel

5Energy-Efficient Task SchedulingThe 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.

6OutlineProject overviewSystem designPower modelOffline energy-efficient task schedulingSimulation and experimental resultsOnline energy-efficient task schedulingSimulation resultsPlan for the next six monthsOutlineProject overviewSystem designPower modelOffline energy-efficient task schedulingSimulation and experimental resultsOnline energy-efficient task schedulingSimulation resultsPlan for the next six monthsModelsTaskiTasks are composed by many instructions.Tasks are non-preemptive.Tasks can be rescheduled in different orders.Processing rate piCore can works under different processing rates.No rate change while processing a task.

Power ModelTasks Energy Consumptionk = (pk)3tktk = Bk / pkk: expected energy consumption(Joules)pk: actual execution ratetk: actual execution timeBk: tasks number of instructionsFrom the above two equations:k = Bk(pk)2Model from Convex Optimization in Local Single-Threaded Parallel Mobile Computing11Simplification Assume there are only two processing ratespH and pLpH = 2* pLChanging processing rate will affect both execution time and energy consumption.

TimeEnergypHT4pL2TCost FunctionCi is the cost for executing Taski.

Tj: The execution time of Taskji: The energy consumption of TaskiH:The cost ratio between time and energy.Bi: Tasks number of instructionsThe cost of a task depends on how long it has to wait and the energy consumed by this task.

H: C = (1-a)* + a*=> H = (1-a) / a13OutlineProject overviewSystem designPower modelOffline energy-efficient task schedulingSimulation and experimental resultsOnline energy-efficient task schedulingSimulation resultsPlan for the next six monthsScenariosAccording to different environment and task characteristic, we can have different scenarios. EnvironmentSingle coreMulti-coreTask characteristicWith deadline constraintWithout deadline

ScenariosSingle core environmentMulti-core environmentTasks with deadlineScenario 1Tasks without deadlineScenario 1Each 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-CompletenessAssume there are n+1 tasksUsing pL, GivenTime:2.5TEnergy:6.5

TimeEnergypHT4pL2T18Proof of NP-C(Cont.)The n+1th task must run with pH1.5T, 2.5 left for the other n tasks.The rest n tasksHalf pH, half pLThis can be reduced to a partition problem.NP-C.

TimeEnergypHT4pL2TSolutionDynamic ProgrammingAssume there are only two processing rates

E(i,t): the energy consumption of finishing itasks before time t.Recursively find the minimum energy consumption.

ScenariosSingle core environmentMulti-core environmentTasks with deadlineNPCNPCTasks without deadlineScenario 2Scenario 2No deadline constraint.Single core environment.

Find an execution sequence that minimize the overall cost.Costi =

Costi

Some LemmasLemma 1Assume that the processing rate of executing each task remain unchanged, shorter task first scheduling leads to the minimum cost.Lemma 2If a task is executed using a higher processing rate, the number of tasks waiting after it must be increased to compensate the extra costs.(?)Lemma Geometric progression If the voltages are geometric progression, executing a task using which voltage depends on the number of tasks after it.

(I have trouble translating this sentence.)

23TheoremTheorem 1There exists an optimal solution with the minimum cost in which the tasks are in non-decreasing order of execution time.

Some TheoremTheorem 1If the adjustable processing rate are geometric progression, there exists an optimal solution with the minimum cost in which the tasks are in non-decreasing order of execution time.Theorem 2If the adjustable processing rate are not geometric progression, there exist an approximation algorithm with approximation bound equal to C. C is the maxima ratio between two consecutive frequencies.

Algorithm1.Sort the tasks by their execution time in ascending order.2.From the last task to the first, do3.check if increasing the processing rateof executing this task benefits the overall cost.4.if yes, increase its processing rate5.loopScenariosSingle core environmentMulti-core environmentTasks with deadlineNPCNPCTasks without deadlineOptimal solutionScenario 3Scenario 3No deadline constraint.Multi-core environment.

Decides which task goes to which coreExample1. waiting time = (0+4+8+12)+(0+8) = 32

2. waiting time = (0+4+8)+(0+4+8) = 24444488448448Scheduling for Multi-coresShorted 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 shorterqueue.Apply frequency tuning for single core algorithm to each queue.ScenariosSingle core environmentMulti-core environmentTasks with deadlineNPCNPCTasks without deadlineOptimal solutionSQF-ATOOutlineProject overviewSystem designPower modelOffline energy-efficient task schedulingSimulation and experimental resultsOnline energy-efficient task schedulingSimulation resultsPlan for the next six monthsExperimental EnvironmentRun fiasco microkernel on x86 machine4 cores12 Processing ratesFrom 1.6GHz to 3.06 GHzBenchmark: MiBench16 synthesis workloads, each with different execution time.From 1 seconds to 17 minutes using 1.6GHz.Power meterSimulationWe 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.0GHzSimulation ResultsThe schedule plan from SQF-ATO is the same as optimal solution.

CostCost(Energy)Cost(Waiting Time)SQF-ATO / Optimal578424732552784832314630Time-only18463700018463700Energy-only23831552238315520Experiment IExecute the schedule plans from simulation, and measure the actual energy consumption and waiting time.Schedule plans:SQF-ATOTime-onlyEnergy-only

Experiment ResultsComparison between simulation and experimental resultsSimulationExperimentDiscrepancySQF-ATO / Optimal57842473550962154.75%Time-only1846370018119161.87%Energy-only23831552241376771.28%Experiment Resultscoreidle38ComparisonDetail of SQF-ATO schedule planCostCost(Energy)Cost(Waiting Time)Simulation578424732552784832314630Experiment550962152368453131411684Discrepancy4.75%7.22%2.79%Summary of Experiment 1The 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 2Compare the cost between SQF-ATO and the baseline scheduling metrics of microkernel.Baseline: FIFO without dynamic frequency scaling.

Experiment ResultsComparisonCostCost(Energy)Cost(Waiting Time)SQF-ATO550962152368453131411684Baseline749551304585841029096720Improvement26.49%48.35%-7.96%Summary of Experiment 2Our heuristic improves the overall cost at about 26%.Mostly from energy consumption(48%)

Experiment 3Extend the frequency choices from 2 to 5.1.6GHz2.0GHz2.4GHz2.8GHz3.0GHz

Experiment ResultsComparisonCostCost(Energy)Cost(Waiting Time)2 frequencies5509621523684531314116845 frequencies533711362368018629690950Improvement3.13%0.018%5.48%Summary of Experiment 3Using the same scheduling algorithm(SQF-ATO), the cost of five frequency choices is lower the cost of two frequency choicesIn this experiment, the largest frequency used is 2.4GHz instead of 3.0GHz.

ComparisonOutlineProject overviewSystem designPower modelOffline energy-efficient task schedulingSimulation and experimental resultsOnline energy-efficient task schedulingSimulation resultsPlan for the next six monthsScenariosTask sets are dynamic.Different types of tasks.Interactive taskComputation taskBackground task

Schedule tasks and adjust core frequency every fixed time interval.U: interval length.Task ModelTask Tk = (Bk, Ak, Dk)Bk: # of instructions.Ak: Task arrival time.Dk: Task deadline.

BkAkDkInteractiveDk < UComputationDk UBackground0-1 : this task only needs to execution this amount of instructions to survive in each interval.

52Some ConstraintsAssume we know Bk.Sequential tasks.The amount of instructions a task needed in one interval must be no greater than the amount of instructions a core can provide.Tasks can migrate between cores, but the cost of task migration is high.

ObjectiveDuring each interval U:Interactive taskFinish before deadline.Computation taskExecute at least x instructions in order to accomplish before deadline.Background taskExecute instructions.=> Resource reservation

Procedures1.Estimate core frequency Decide the # of core with high frequency.Schedule tasks to core

3.Further adjust core frequencyAdjust the frequency of each core according to tasks assigned to it.

Procedure 1Decide the # of core with high frequency.According to interactive tasks.Every interactive tasks should meet their deadline.The other cores use the lowest frequency first.Estimate how many instructions can be executed in current setting.If less than the requirement of computation task and background task, increase frequency.

HHLLComputation & Background TasksInteractive TasksExampleProcedure 1(Cont.)Fetch all the tasks in ready queueFor i = 1 to nApply EDF to interactive tasks on i high frequency coreIf(all interactive tasks meet deadline) break;Set the rest core with lowest frequencyWhile(Provide < Needs)Increase core frequency

DiscussionInteractive tasks can arrive during a time interval.New interactive tasks will start a new interval.Assign tasks to core is NP-C.Provide = Needs = 2xEach core provides xAssign tasks to core=> partition problem, NP-C

HHLLComputation & Background TasksInteractive TasksOutlineProject overviewSystem designPower modelOffline energy-efficient task schedulingSimulation and experimental resultsOnline energy-efficient task schedulingSimulation resultsPlan for the next six monthsOutlineProject overviewSystem designPower modelOffline energy-efficient task schedulingSimulation and experimental resultsOnline energy-efficient task schedulingSimulation resultsPlan for the next six monthsPlan for the next six monthsOnline energy-efficient task schedulingModeling tasks with different characteristicCPU intensive, memory intensiveScheduling task to coreTasks are non-preemptive, NP-C.PreemptiveTask migration

Plan for the next six months(Cont.)ExperimentsOffline task schedulingExperimental results on ARM board.Online task schedulingBenchmark collectingExperimental results

Thanks for your attention.