# 15-849 Assignment 2: PowerTOP

Assigned:: Sunday, Jan 25
Due: Wednesday, Feb 4th, 11:59pm

For this assignment,

1. Install PowerTOP on your (Linux-running) computer, with whatever kernel modifications are necessary to get it to properly report stats
2. Write a program that takes as parameters:
• Active duration (microseconds)
• Sleep duration (microseconds)

and alternates between busy-waiting for active_seconds doing additions, and sleeping using nanosleep for the sleep duration. You will run this program with different sizes for each of these, with various values of active seconds and different ratios of sleep time. For example, active seconds = 10, sleep duration = 90 would represent a 10% busy workload with a granularity of 10 microseconds.

3. Run this program, with active/sleep seconds that vary in order to create plots that show the percentage of time in each P-state and C-state as you vary the %age busy and the granularity of work:
• Plots 1-3:
X axis: %age busy
Y axis: A representation of time in the various states

Create three plots for "fine grained" work, "medium grained" work, and "coarse grained" work, which perform work in intervals of 10 microseconds, 1 millisecond, and 1 second. You may choose the format of the plots as you wish (stacked bar charts, some way of showing it as a line plot, etc), as long as it clearly shows the trends you observed.

• Plots 4-6: X axis: Work unit granularity
Y axis: A representation of time in the various states

For "light" (10%), "medium" (50%), and "heavy" (90%) load, plot three graphs showing the percentage of the states as you vary the X axis through 1, 10, 100 microseconds, 1, 10, 100 milliseconds, 1, 10 seconds. As above, choose a clear format which which to represent the data.

4. Record the average power used by your computer during each of these experiments. (Note that you can use the kill-a-watt to measure power over time, averaged). Plot the power used for the same experiments.

For questions and discussion about the assignment, please make use of the Assignment 2 Wiki Page. I've started this off with some discussion about measuring the sleep and active time of your busy-wait program.

Last updated: Sun Feb 08 13:13:23 -0500 2009 [validate xhtml]