A Simulation of Power Management in Multiprocessors
Based on a paper published in RTSS'01

Original code by Ahren Studer
Rewritten by Emil Macarie

Index




Introduction

Why is power management important?
Besides for the idea of saving power there are two major reasons that make power management practical, extending battery and charge life for portable systems, and lowering temperatures.

Battery Life
With less energy consumed a battery's charge will last a much longer time, resulting in less recharges, and increasing the overall longevity of the battery.
Temperature
With faster and faster processors constantly being created the issue of system temperature is become a more troublesome issue. In systems with multiple processors running at over a gigahertz, a heat sink and a fan is barely enough, leading to the requirement of alternative cooling methods that are more expensive. With variable running speeds (used properly) the chips will run at slower rates when possible, and under normal circumstances lower the overall temperature of the system, making these expensive cooling methods optional.
How does running slower save energy?
Running processors at lower speeds reduces the amount of energy consumed due to the cubic relation between speed and energy. If energy was consumed in a linear fashion when compared to processor speed, power management would just slow down the system, not save energy. However, a system running at 50% would consume only 1/8 of the power a system running at 100% would consume. Slowing a system down further to 33% results in the consumption of only 1/27 of the power in the same amount of time.


Getting Started

To start you can either generate a random graph or create your own graph.

Creating and Editing a Graph

To create a graph you must create a series of individual nodes or in this case tasks.

Creating a Task

To create a task fill in the information for the tasks Worst case number of cycles and the fraction of those cycles that it will take to run the task on averageET. The predecessors field contains the predecessors of the task and the power coefficient field is the k in the formula for Power = k*s*v^2. If the task number is left blank or it is filled with meaningless symbols, then a new task will be created with the next available positive number. When all the information is filled in click the "Add Task" button.

Getting Information About a Task

Enter the number corresponding to that task in the field next to "task #" and click "Get Information". All fields correspoding to the task will be shown in the area below. Alternatively, click on the circle representing the task in the visual task graph.

Changing Information For a Task

First get the tasks information, then click the "Edit Task" button. A popup will appear with the task name and fields. Edit the desired fields and click the update button. Right clicking on the task circle in the task graph and then selecting the Edit Option will also bring up the same popup

Deleting a Task

To delete a task enter the id of the task you want to delete into the field next to "task #" and then click "remove task". Also you can right click on the task circle and select the Delete option.

Clearing all Tasks

To remove all tasks from the graph just click the "Clear Graph" button.

Generating a random graph

In order to generate a random task, correctly fill in all the fields in the task set window. The number of tasks is the total number of tasks. The ND tasks is the minimum number of tasks without any dependencies. Everything else is a random number with a uniform distribution within the given range. The range is entered smaller number first and larger number second. Once everything is filled in, simply click the Random button.

Running a Simulation

Once a graph is created you can run the set of tasks, using any of the 5 methods (cannonical, static, slack sharing, and full statistical, overhead slack sharing). Overhead slack sharing takes into account the overhead entered in the processor data. The other 4 algorithms assume that overhead is zero. Select one of the 4 methods by clicking on the bar next to choose method and picking the desired one.
Before running the simulation, you can change the other parameters, but this is not necessary. When you're satisfied with the parameters you can run the simulation by clicking "run simulation".
*** Due to some problems with IE an error message about "array index out of bounds" may appear, simply clik "run simulation" again and everything should be fine. ***


Viewing the Results

Once the simulation is run you can view the results on the window that pops up. Each numbered bar represents a processor. On each bar is numbered blocks representing a task, the colored part is the actual run time, and the empty box is the worst case run time. The x axis is time and the y axis is speed. Using the different buttons it is possible to zoom in or out, move left or right, and animate the graph (step by step or all at once fluidly).

Task Parameters

Predecessors - the tasks that must be completed before the new task can be run (these tasks must be defined)
Worst Case # of Cycles - the worst case number of cycles in millions of cycles This will be the run time during the cannonical simulation, and is an upper bound on the run time during all other simulations
Average Fraction of WCNC - the average execution time of the task, this must be entered as a percent, ie if the task takes on average 1/2 of the Worst Case number of cycles then enter .5
Power Coefficient - the power coefficient in the equation for power. This coefficient is multiplied by 10 ^-9 in the actual formula.

Simulation Parameters

# of processors - the number of processors to have in the simulation
distribution of execution times - used to define the distribution of the running time around the average run time
Processor Model - the processor model which will be used to run the simulation
load - the percentage of slack for there to be in the system, for example if the load is 50 then there is a 50% slack in the system meaning the deadline is 2 times the run time of the cannonical

Creating and Saving Processor Models

The simulation can be run with any number of user created processors.

Creating a processor

To create a processor click the New Processor Button. Enter the the speeds and voltages in the corresponding columns. The speeds MUST BE ENTERED IN DECREASING ORDER. There is a sort button to help with this task. Then enter the values for the idle coefficient, and the fields for the time required to change speeds. Once done, click the Save button. This will add the processor to the processor list. To actually save the processor model on your computer, click the Save Processor Button.

Getting Information About a Processor

Select the processor in the drop down menu and click the View Processor Button.

Security Concerns

If the Load/Save buttons in the applet do not work, then you need to give permissions to the applet to load and store files. The correct permission settings will only work with the Java Virtual Machine from Sun. Simply place this permission file into your home directory. In order to find out your home directory on a windows machine, click on the JVM icon in the bottom right of the screen or the systray.

Page modified and applet rewritten by Emil Macarie a current freshman of the
University of Pittsburgh .
Page and applet originally created by Ahren Studer a student of the
University of Rochester. .