David Tam Winnie Tsang Catalin Drula CSC2228 Project - Second Progress Report Dynamic Voltage Scaling in Mobile Devices ========================================= November 11, 2003 Project Web Page: http://www.eecg.toronto.edu/~tamda/csc2228/ 1.0 Summary ======= Our architecture consists of three main parts: (1) modifications to the Linux OS scheduler, (2) the core DVS algorithm that continuously determines CPU speed, which is platform independent, and (3) the bottom-end component that communicates with the CPUFreq API to set the CPU speed. Currently, we have implemented, compiled, integrated, and executed parts (1) and (2) without any problems. That is, a prototype of the system is running on Linux kernel 2.6. This alpha prototype currently runs under the Bochs x86 complete machine simulator. This running prototype gives us great confidence about our code. 2.0 Progress Details ================ In particular, we have made progress in the following areas: 1) Implementation of DVS algorithms 2) Modifications to the Linux OS scheduler In the following sections, we will give a detailed description for each of the above areas. 2.1 DVS Algorithms -------------- We have implemented the "past" and "peak" algorithms. They have been component-tested to our satisfaction. They have also been integrated with the Linux scheduler successfully. The past algorithm actually runs in a newly compiled Linux 2.6 kernel and, for debugging purposes, outputs the desired CPU speed on a scale of 1 to 100 %. In the process of modifying the Linux scheduler, we have come up with our own simple DVS algorithm which we call "future". It simply reuses the "past" algorithm but asks for data about future jobs in the upcoming interval. This can be easily supplied by our modified OS scheduler by examining the job run queue. That is, instead of predicting the CPU load of the upcoming interval based on job characteristics during the previous interval, we predict the CPU load of the upcoming interval based on the job characteristics of the upcoming interval. Pretty obvious, right? This algorithm can be considered to be implemented now since it requires no changes to the existing "past" algorithm (although minor extensions are needed in the OS scheduler). As well, we see opportunities to make use of the rich set of data found in the task process control blocks to make more accurate predictions. For instance, we can tweak the DVS algorithms (or come up with a few more of our own) using task priority information and sleep average information. 2.2 Modifying Linux Scheduler ------------------------- Major modifications to the Linux OS scheduler is complete. There is currently support for the "past" and "peak" algorithms. Support of the "future" algorithm and others (that we dream up) will be easily implemented in the near future. Only small incremental extensions need to be added because it reuses most the software infrastructure added for "past" and "peak". As mentioned previously, our prototype system boots and runs without any problems. 3.0 Left To Do ========== We need to work on component (3) the bottom-end Linux CPUFreq component. We appear to be mostly on track with our original proposed schedule. We need to follow the rest of our milestones. We need to quickly finish up the scheduler component to support our "future" algorithm. If we desire, we need to quickly dream up a 4th DVS algorithm and quickly implement it. We need to transfer the working modified Linux 2.6 kernel to Catalin's Pentium 4M laptop and make sure it runs there. Once all 3 components have been finalized and adequately tested, we will most likely run an mpeg audio/video player as our workload and go ahead with our planned experiments to compare battery life. According to our milestones shown below (Section 3.0), we appear to be on track. We have not encountered any serious, crippling, mysterious bugs in our system. The modified Linux 2.6 kernel doesn't crash and appears to do what we want. The fact that we have a running prototype that doesn't crash gives us a lot of confidence. We think our project is in good shape. 4.0 Milestones ========== For your convenience, here are our original milestones. We are mostly on track. * Sept 23 - Oct 21 (Week 1 - 4) o Research the purchase of a PDA capable of dynamic voltage scaling. Nevermind! Using a laptop with DVS support instead. o Install LINUX on the laptop and get familiar with the OS scheduler. o First progress report (Oct 14) * Oct 21 - Nov 18 (Week 4 - 8) o Determine and test suitable laptop application workloads. o Implement 3 to 4 DVS algorithms in the OS scheduler. o Test & debug the system o Second progress report (Nov 11) * Nov 18 - Nov 25 (Week 8 - 9) o Run experiments, collect, evaluate, analyze results. * Nov 25 - Dec 15 (Week 9 -11) o Presentation (Dec 2) o Final Report (Dec 15)