Attributing energy consumption to individual code threads in a data processing system
Uloženo v:
| Název: | Attributing energy consumption to individual code threads in a data processing system |
|---|---|
| Patent Number: | 8,015,566 |
| Datum vydání: | September 06, 2011 |
| Appl. No: | 11/034558 |
| Application Filed: | January 13, 2005 |
| Abstrakt: | A data processing system attributes energy consumption to individual program segments or threads includes a processor that executes a first thread during a first portion of a measurement interval and a second thread during a second portion of the interval. An energy monitor measures the total energy during the interval. Energy attribution code attributes a first amount of the total energy to the first thread and a second amount to the second thread based in part on the execution times of the threads. The code may define a range of possible energy values by determining maximum and minimum energy constraints for the threads. The invention may also be extended to a multiprocessor environment and to a simultaneous multithreading (SMT) processor. In addition, the process may be expanded to determine energy consumed by various peripheral units such as hard disk controllers and the like. |
| Inventors: | Lefurgy, Charles R. (Round Rock, TX, US); Ware, Malcolm Scott (Austin, TX, US) |
| Assignees: | Lenovo (Singapore) Pte. Ltd. (Singapore, SG) |
| Claim: | 1. A data processing system, comprising: a processor to execute a first thread during a first portion of a measurement interval and a second thread during a second portion of the measurement interval; an energy monitor to determine the total energy consumed by the processor during the measurement interval absent separate measurement of energy consumed during the first and the second portions of the measurement interval; and energy attribution code, stored in a processor readable storage medium, to estimate a first amount of the total energy attributable to the first thread and a second amount of the total energy attributable to the second thread comprising: determining from the execution time of the first thread a maximum and minimum energy constraint for the first thread, wherein the maximum and minimum energy constraint for the first thread represent constraints on the amount of the total energy attributable to the first thread; determining from the execution time of the second thread a maximum and minimum energy constraint for the second thread, wherein the maximum and minimum energy constraint for the second thread represent constraints on the amount of the total energy attributable to the second thread; using the first and second thread maximum and minimum energy constraints and the total energy to define a range for the amount of the total energy attributable to the first thread; and using a point within the defined range as the estimate of the amount of the total energy attributable to the first thread. |
| Claim: | 2. The data processing system of claim 1 , wherein the energy attribution code to use the first thread maximum and minimum energy, the second thread maximum and minimum energy, and the total energy includes code to: determine a minimum constraint on the range by determining a second minimum energy constraint for the first thread representing the amount of the total energy attributable to the first thread assuming the processor consumed the maximum amount of energy to execute the second thread; and selecting the greater of the first minimum energy constraint for the first thread and the second minimum energy constraint for the first thread as the operative minimum constraint. |
| Claim: | 3. The data processing system of claim 2 , wherein the energy attribution code to use the first thread maximum and minimum energy, the second thread maximum and minimum energy, and the total energy includes code to: determine a maximum constraint on the range by determining a second maximum energy constraint for the first thread representing the amount of energy attributable to the first thread assuming the processor consumed the minimum amount of energy to execute the second thread; and select the lesser of the first maximum energy constraint for the first thread and the second maximum energy constraint for the first thread as the operative maximum constraint. |
| Claim: | 4. The data processing system of claim 1 , further comprising a second processor and a second energy monitor to determine the total energy consumed by the second processor during the measurement interval, wherein the energy attribution code estimates an amount of the total energy consumed by the second processor to execute a third thread and an amount of the total energy consumed by the second processor used to execute a fourth thread. |
| Claim: | 5. The data processing system of claim 1 , wherein the estimates of the amount of the total energy attributable to the first and second threads is based at least in part on respective execution times of the first and second threads. |
| Claim: | 6. A data processing system, comprising: a functional unit implemented in hardware to perform tasks for multiple objects including at least one task supporting a first object and a second object; a hardware energy monitor implemented in hardware to measure total energy consumed by the functional unit during a measurement period absent separate measurement of energy consumed during the first and the second portions of the measurement interval; a scheduler to provide timing information indicative of time portions of the measurement period during which the functional unit was performing the at least one task for each of first and second objects; and an application to attribute portions of the total energy to each of the objects based on the timing information and the total energy consumed by the functional unit during the measurement interval, including deriving maximum and minimum energy constraints for each of the objects and determining an energy consumption value between the constraints. |
| Claim: | 7. The data processing system of claim 6 , wherein the functional unit is selected from the group consisting of: a processor, a peripheral device, and a disk controller. |
| Claim: | 8. The data processing system of claim 6 , wherein each of the multiple objects is a thread executing under control of an operating system. |
| Claim: | 9. The data processing system of claim 6 , wherein each of the multiple objects is an operating system executing control of a hypervisor. |
| Claim: | 10. The data processing system of claim 6 , wherein the application attributes portions of the total energy to each of the objects subject to maximum and minimum energy consumption constraints. |
| Claim: | 11. The data processing system of claim 10 , wherein the maximum and minimum constraints are determined from maximum and minimum energy consumption rates associated with the functional unit and the timing information. |
| Claim: | 12. The data processing system of claim 6 , wherein the system determines the measurement period based on the timing information wherein a first object was performing tasks for a substantial majority of the measurement period. |
| Claim: | 13. A computer program product comprising computer executable instructions, stored on a computer-readable medium, for attributing energy consumption in a data processing system to objects executing in the system, the program product comprising: computer code to determine a total energy consumed by the data processing system during a measurement period absent separate measurement of energy consumed during the first and the second portions of the measurement interval; computer code to determine timing information for a plurality of objects within a single task, wherein the timing information is indicative of which objects were executing during the measurement period; computer code to use the timing information and the total energy to attribute the energy to each of the objects, including deriving maximum and minimum energy consumption constraints for each of the objects; and computer code to determine an energy consumption value for each object between the maximum and minimum energy consumption constraints associated with that object. |
| Claim: | 14. The computer program product of claim 13 , wherein the computer code to determine timing information comprises a scheduler to schedule execution of threads on a processor of the data processing system. |
| Claim: | 15. The computer program product of claim 13 , wherein the computer code to determine timing information comprises a hypervisor scheduler providing context switch information to schedule execution of a one or more operating system objects. |
| Claim: | 16. The computer program product of claim 13 , wherein the computer code to determine timing information comprises disk controller scheduler to schedule tasks for execution on a disk controller. |
| Current U.S. Class: | 718/104 |
| Patent References Cited: | 6609208 August 2003 Farkas et al. 6658654 December 2003 Berry et al. 6687558 February 2004 Tuszynski 7197652 March 2007 Keller et al. 7426731 September 2008 Findeisen 2006/0107262 May 2006 Bodas et al. |
| Other References: | Chen, Rita Yu, “An Architectural Level Power Estimator”, ISCA 98, Jun. 1998, pp. 1-5. cited by examiner Flinn, Jason, and Satyanarayanan, PowerScope: A Tool for Profiling the Energy Usage of Mobile Applications; Proceedings of the Second IEEE Workshop on Mobile Computer Systems and Applications, IEEE Computer Society, 1999, Washington, DC. cited by other |
| Assistant Examiner: | Kessler, Gregory |
| Primary Examiner: | Puente, Emerson |
| Attorney, Agent or Firm: | Lieberman & Brandsdorfer, LLC |
| Přístupové číslo: | edspgr.08015566 |
| Databáze: | USPTO Patent Grants |
Buďte první, kdo okomentuje tento záznam!