United States Patent7225441
Kozuch , ; et al.May 29, 2007

Title

Mechanism for providing power management through virtualization

Abstract

In one embodiment, a method for providing power management via virtualization includes monitoring the utilization of a host platform device by one or more virtual machines and managing power consumption of the host platform device based on the results of monitoring.


Inventors:Kozuch; Michael (Beaverton, OR), Chou; Stephen  (North Plainfield, NJ), Cota-Robles; Erik  (Portland, OR), Jeyasingh; Stalinselvaraj  (Portland, OR), Kagi; Alain  (Portland, OR), Neiger; Gilbert  (Portland, OR), Schoenberg; Sebastian  (Dresden, DE), Uhlig; Richard  (Hillsboro, OR)
Assignee:Intel Corporation (Santa Clara, CA)
Appl. No.:09/752,586
Filed:December 27, 2000
PCT Pub Date:May 30, 2007

Current U.S. Class:718/1 709/223 709/226 713/300 713/320 713/323 713/340 
Current International Class:G06F 9/455 (20060101) G06F 1/26 (20060101) G06F 15/173 (20060101)
Field of Search:718/1-108 712/1 713/300-340 709/223-226

U.S. Patent Documents
20010021969September 2001Burger et al.
20010027511October 2001Wakabayashi et al.
20010027527October 2001Khidekel et al.
20020007456January 2002Peinado et al.
20020023032February 2002Pearson et al.
20020147916October 2002Strongin et al.
20020166061November 2002Falik et al.
20020169717November 2002Challener
20030018892January 2003Tello
20030074548April 2003Cromer et al.
20030115453June 2003Grawrock
20030126442July 2003Glew et al.
20030126453July 2003Glew et al.
20030159056August 2003Cromer et al.
20030188179October 2003Challener et al.
20030196085October 2003Lampson et al.
20040117539June 2004Bennett et al.
3699532October 1972Schaffer et al.
3996449December 1976Attanasio et al.
4037214July 1977Birney et al.
4162536July 1979Morley
4207609June 1980Luiz et al.
4247905January 1981Yoshida et al.
4276594June 1981Morley
4307447December 1981Provanzano et al.
4319233March 1982Matsuoka et al.
4319323March 1982Ermolovich et al.
4347565August 1982Kaneda et al.
4403283September 1983Myntti et al.
4419724December 1983Branigin et al.
4430709February 1984Schleupen
4571672February 1986Hatada et al.
4621318November 1986Maeda
4759064July 1988Chaum
4795893January 1989Ugon
4802084January 1989Ikegaya et al.
4825052April 1989Chemin et al.
4907270March 1990Hazard
4907272March 1990Hazard
4910774March 1990Barakat
4975836December 1990Hirosawa et al.
5007082April 1991Cummins
5079737January 1992Hackbarth
5187802February 1993Inoue et al.
5230069July 1993Brelsford et al.
5237616August 1993Abraham et al.
5287363February 1994Wolf et al.
5295251March 1994Wakui et al.
5317705May 1994Gannon et al.
5319760June 1994Mason et al.
5361375November 1994Ogi
5386552January 1995Garney
5434999July 1995Goire et al.
5437033July 1995Inoue et al.
5442645August 1995Ugon et al.
5455909October 1995Blomgren et al.
5459867October 1995Adams et al.
5469557November 1995Salt et al.
5504922April 1996Seki et la.
5506975April 1996Onodera
5511217April 1996Nakajima et al.
5522075May 1996Robinson et al.
5528231June 1996Patarin
5533126July 1996Hazard et al.
5555385September 1996Osisek
5555414September 1996Hough et al.
5560013September 1996Scalzi et al.
5564040October 1996Kubals
5566323October 1996Ugon
5574936November 1996Ryba et al.
5582717December 1996Di Santo
5590342December 1996Marisetty
5604805February 1997Brands
5606617February 1997Brands
5628022May 1997Ueno et al.
5633929May 1997Kaliski, Jr.
5668971September 1997Neufeld
5684948November 1997Johnson et al.
5706469January 1998Kobayashi
5720609February 1998Pfefferle
5721222February 1998Bernstein et al.
5737604April 1998Miller et al.
5737760April 1998Grimmer, Jr. et al.
5740178April 1998Jacks et al.
5752046May 1998Oprescu et al.
5757604May 1998Bennett et al.
5757919May 1998Herbert et al.
5784628July 1998Reneris
5796835August 1998Saada
5809546September 1998Greenstein et al.
5825875October 1998Ugon
5825880October 1998Sudia et al.
5852717December 1998Bhide et al.
5854913December 1998Goetz et al.
5867577February 1999Patarin
5872994February 1999Akiyama et al.
5900606May 1999Rigal
5901225May 1999Ireton et al.
5903752May 1999Dingwall et al.
5919257July 1999Trostle
5935242August 1999Madany et al.
5935247August 1999Pai et al.
5944821August 1999Angelo
5953502September 1999Helbig, Sr.
5953536September 1999Nowlin, Jr.
5956408September 1999Arnold
5970147October 1999Davis
5978475November 1999Schneier et al.
6035374March 2000Panwar et al.
6044478March 2000Green
6055637April 2000Hudson et al.
6061794May 2000Angelo et al.
6075938June 2000Bugnion et al.
6085296July 2000Karkhanis
6088262July 2000Nasu
6092095July 2000Maytal
6093213July 2000Favor et al.
6101584August 2000Satou et al.
6108644August 2000Goldschlag et al.
6115816September 2000Davis
6125430September 2000Noel et al.
6131166October 2000Wong-Insley
6148379November 2000Schimmel
6173417January 2001Merrill
6175924January 2001Arnold
6182089January 2001Ganapathy et al.
6188257February 2001Buer
6192455February 2001Bogin et al.
6199152March 2001Kelly et al.
6212635April 2001Reardon
6222923April 2001Schwenk
6249872June 2001Wildgrube et al.
6252650June 2001Nakamura
6269392July 2001Cotichini et al.
6272533August 2001Browne
6272637August 2001Little et al.
6275933August 2001Fine et al.
6282650August 2001Davis
6292874September 2001Barnett
6301646October 2001Hostetter et al.
6308270October 2001Guthery
6314409November 2001Schneck et al.
6321314November 2001Van Dyke
6327652December 2001England et al.
6330670December 2001England et al.
6339815January 2002Feng et al.
6339816January 2002Bausch
6357004March 2002Davis
6363485March 2002Adams et al.
6374286April 2002Gee et al.
6374317April 2002Ajanovic et al.
6378068April 2002Foster
6378072April 2002Collins et al.
6389537May 2002Davis et al.
6397242May 2002Devine et al.
6397379May 2002Yates et al.
6412035June 2002Webber
6421702July 2002Gulick
6435416August 2002Slassi
6445797September 2002McGough et al.
6463535October 2002Drews et al.
6463537October 2002Tello
6499123December 2002McFarland et al.
6505279January 2003Phillips et al.
6507904January 2003Ellison et al.
6529909March 2003Bowman-Amuah
6535988March 2003Poisner
6557104April 2003Vu et al.
6560627May 2003McDonald et al.
6609199August 2003DeTreville
6615278September 2003Curtis
6633963October 2003Ellison et al.
6633981October 2003Davis
6651171November 2003England et al.
6678825January 2004Ellison et al.
6684326January 2004Cromer et al.
6763454July 2004Wilson et al.
6901522May 2005Buch
Foreign Patent Documents
0 892 521Jan., 1999EP
0 965 902Dec., 1999EP
0473913Mar., 1992EP
0600112Jun., 1994EP
0602867Jun., 1994EP
0930567Jul., 1999EP
0961193Dec., 1999EP
1 055 989Nov., 2000EP
1 056 014Nov., 2000EP
1 085 396Mar., 2001EP
1 271 777Jan., 2003EP
1030237Aug., 2000EP
1146715Oct., 2001EP
1209563May., 2002EP
42177444Dec., 1992DE
76139Mar., 2000JP
WO 00/62232Oct., 2000WO
WO 01 75564Oct., 2001WO
WO 01/27723Apr., 2001WO
WO 01/27821Apr., 2001WO
WO 01/63994Aug., 2001WO
WO 01/75565Oct., 2001WO
WO 01/75595Oct., 2001WO
WO 02 086684Oct., 2002WO
WO 02 17555Feb., 2002WO
WO 02/01794Jan., 2002WO
WO 02/060121Aug., 2002WO
WO 03/058412Jul., 2003WO
WO 95/24696Sep., 1995WO
WO 97/29567Aug., 1997WO
WO 98/12620Sep., 1996WO
WO 98/34365Aug., 1998WO
WO 98/44402Oct., 1998WO
WO 99/05600Feb., 1999WO
WO 99/09482Feb., 1999WO
WO 99/18511Apr., 1999WO
WO 99/57863Nov., 1999WO
WO 99/65579Dec., 1999WO
WO-0021238Apr., 2000WO
Other References
Benini et al., "Policy Optimization for Dynamic Power Management", IEEE, 1999, pp. 813-833. cited by examiner .
Berg, Cliff, "How Do I Create A Signed Applet?" Dr. Dobb's Journal, Aug. 1997, pp. 1-9. cited by other .
Goldberg, Robert P., "Survey of Virtual Machine Research," IEEE Computer Magazine vol. 7, No. 6, pp. 34-35, 1974. cited by other .
Gong, Li, et al., "Going Beyond the Sandbox: An Overview of the New Security Architecture in the Java Development Kit 1.2," JavaSoft, Sun Microsystems, Inc., Proceedings of the USENIX Symposium on Internet Technologies and Systems, Monterey, California, 11 pages Dec. 1997. cited by other .
Gum, P.H., "System/370 Extended Architecture: Facilities for Virtual Machines," IBM J. Research Development, vol. 27, No. 6, pp. 530-544, Nov. 1983. cited by other .
Heinrich, J., "MIPS R4000 Microprocessor User's Manual," Second Edition, Chapter 4: Memory Management, pp. 67-79. cited by other .
Intel Corporation, Intel386.TM. DX Microprocessor, 32-Bit CHMOS Microprocessor With Integrated Memory Management, 56 pages, Dec. 1995. cited by other .
Lawton, K., "Running Multiple Operation Systems Concurrently On An IA32 PC Using Virtualization Techniques," http:/ /www.plex86.org/research/paper.txt., pp. 1-31, downloaded Aug. 9, 2001. cited by other .
Motorola, M68040 User's Manual (Including the MC68040, MC68040V, MC68LC040, MC68EC040, and MC68EC040V), Revised 1993. cited by other .
Rosenblum, M., "VMware's Virtual Platform.TM. A Virtual Machine Monitor for Commodity PCs," Proceedings of the 11th Hotchips Conference, Stanford University Palo Alto, California, pp. 185-196, Aug. 1999. cited by other .
Heinrich, J., "MIPS R4000 Microprocessor User's Manual," Chapter 4, Memory Management, pp. 61-67, 1993. cited by other .
Chien, Andrew A., et al., "Safe and Protected Execution for the Morph/AMRM Reconfigurable Processor," 7th Annual IEEE Symposium, FCCM '99 Proceedings Apr. 21, 1999, pp. 209-221, XP010359180, ISBN: 0-7695-0375-6, Los Alamitos, CA. cited by other .
IBM Technical Disclosure Bulletin, "Information Display Technique For a Terminate Stay Resident Program," vol. 34, Issue No. 7A, pp. 156-158. Dec. 1, 1991. cited by other .
Karger, Paul A., et al., "A VMM Security Kernel for the VAX Architecture," Proceedings of the Symposium on Research in Security and Privacy, May 7, 1990, pp. 2-19, XP010020182, ISBN: 0-8186-2060-9, Boxborough, MA. cited by other .
Kashiwagi, Kazuhiko, et al., "Design and Implementation of Dynamically Reconstructing System Software," Software Engineering Conference, 1996 Asia Pacific Seoul, South Korea, IEEE Comput. Soc. Dec. 4, 1996, pp. 278-287. cited by other .
PCT Search Report dated Jul. 29, 2003 (U.S. Patent No. '075 Previously cited). cited by other .
PCT Search Report dated Jul. 22, 2003. cited by other .
Robin, John Scott and Irvine, Cynthia E., "Analysis of the Pentium's Ability to Support a Secure Virtual Machine Monitor," Proceedings of the 9th USENIX Security Symposium, Aug. 14, 2000, pp. 1-17, XP002247347, Denver, CO. cited by other .
Brands, Stefan , "Restrictive Blinding of Secret-Key Certificates", Springer-Verlag XP002201306, (1995), Chapter 3. cited by other .
Davida, George I., et al., "Defending Systems Against Viruses through Cryptographic Authentication", Poceedings of the Symposium on Security and Privacy, IEEE Comp. Soc. Press, ISBN 0-8186-1939-2, (May 1989). cited by other .
Intel, "IA-32 Intel Architecture Software Developer's Manual", vol. 3: System Programming Guide, Intel Corporation--2003, 13-1 through 13-24. cited by other .
Luke, Jahn , et al., "Replacement Strategy for Aging Avionics Computers", IEEE AES Systems Magazine, XP002190614, (Mar. 1999). cited by other .
Menezes, Oorschot , "Handbook of Applied Cryptography", CRC Press LLC, USA XP002201307, (1997), 475. cited by other .
Richt, Stefan , et al., "In-Circuit-Emulator Wird Echtzeittaughlich", Elektronic Franzis Verlag GMBH, Munchen, DE, vol. 40, No. 16, XP 000259620, (100-103), Aug. 6, 1991. cited by other .
Saez, Sergio , et al., "A Hardware Scheduler for Complex Real-time Systems", Proceedings of the IEEE International Symposium on Industrial Electronics, XP0002190615, (Jul. 1999), 43-48. cited by other .
Sherwood, Timothy , et al., "Patchable Instruction ROM Architecture", Department of Computer Science and Engineering, University of California, San Diego, La Jolla, CA, (Nov. 2001). cited by other .
IBM Corporation, "IBM ThinkPad T30 Notebooks", IBM Product Specification, located at www-1.ibm.com/services/files/cisco.sub.--t30.sub.--spec.sub.--sheet.sub.-- -070202.pdf, pp. 1-6 (Jul. 2, 2002). cited by other .
Intel Corporation," Intel 82802AB/82802AC Firmware Hub (FWH)", Intel Product Datasheet, Document No. 290658-004, pp. 17-28 (Nov. 2000). cited by other .
Intel Corporation, "IA-64 System Abstraction Layer Specification", Intel Product Specification, Order No. 245359-001, 112 pages, Jan. 2000. cited by other .
Intel Corporation, "Intel IA-64 Architecture Software Developer's Manual--vol. 2: IA-64 System Architecture", Intel Product Manual, Order No. 245318-001, pp. i, ii, 5.1-5.3, 11.1-11.8, 11.23-11.26, Jan. 2000. cited by other .
Menezes, Alfred J., et al., "Handbook of Applied Cryptography", CRC Press Series on Discrete Mathematics and its Applications, Boca Raton, FL, ISBN 0849385237, pp. 403-405, 506-515, 570 (Oct. 1996). cited by other .
Nanba, S. et al., "VM/4: ACOS-4 Virtual Machine Architecture", IEEE Proceedings of the 12th Annual Symposium on Computer Architecture, pp. 171-178 (Jun. 1985). cited by other .
RSA Security Inc., "Hardware Authenticators", located at www.rsasecurity.com/node.asp?id=1158, pp. 1-2 (2004). cited by other .
RSA Security Inc., "Software Authenticators", located at www.rsasecurity.com/node.asp?id =1313, pp. 1-2 (2004). cited by other .
RSA Security Inc., "RSA SecurID Authenticators", located at www.rsasecurity.com/products/securid/datasheets/SID.sub.--DS.sub.--0103.p- df, pp. 1-2 (2003). cited by other .
Schneier, B., "Applied Cryptography: Protocols, Algorithm, and Source Code in C", 2.sup.nd Edition, Wiley, John & Sons, Inc., ISBN 0471117099 (hardcover printing), pp. 47-52, 56-65, 169-187 (Oct. 1995). cited by other .
Schneier, B., "Applied Crytography: Protocols, Algorithm, and Source Code in C", 2.sup.nd Edition, Wiley, John & Sons, Inc., ISBN 0471128457 (softcover printing), pp. 28-33, 176-177, 216-217, 461-473, 518-522 (Nov. 1995). cited by other .
Coulorouris, G. et al., "Distributed Systems: Concepts and Design", 2.sup.nd Edition, Addison-Wesley Publishers Ltd., Essex England, pp. 422-424 (1994). cited by other .
Crawford, J., "Architecture of the Intel 80386", Proceedings of the IEEE International Conference on Computer Design: VLSI in Computers (ICCD '86), ISBN 0-8186-0735-1, pp. 155-160 (Oct. 6-9, 1986). cited by other .
Fabry, R.S., "Capability-Based Addressing", Communications of the ACM, vol. 17, No. 7, pp. 403-412 (Jul. 1974). cited by other .
Frieder, G., "The Architecture and Operational Characteristics of the VMX Host Machine", IEEE Proceedings of the 15th Annual Workshop on Microprogramming, pp. 9-16, (Oct. 5, 1982). cited by other .
Hewlett Packard Company, "Mobile Security Overview", pp. 1-9, (Sep. 2002). cited by other .
Hall, J., et al.: "Virtualizing the VAX Architecture" Computer Architecture News, vol. 19, pp. 380-389, (May 1991). cited by other .
Intel, "IA-32 Intel Architecture Software Developer's Manual," vol. 3 System Programming Guide, Intel Corporation - 2003, 13-1 through 13-24. cited by other.~
Primary Examiner: Bullock, Jr.; Lewis A.
Assistant Examiner: To; Jennifer N.
Attorney, Agent or Firm:Reynolds; Derek J.

Claims


What is claimed is:
1. A method of providing power management, the method comprising: a virtual machine monitor (VMM) monitoring utilization of a platform device within a computing platform by one or more other virtual machines; the VMM identifying a decrease in power available to the computing platform: and the VMM managing power consumption of the platform device based on the monitoring upon the identified decrease in available power.

2. The method of claim 1 wherein monitoring further comprises determining resource allocation of the platform device to each of said one or more virtual machines when each of said one or more virtual machines is either started or stopped.

3. The method of claim 1 wherein monitoring further comprises: identifying a change in operation of said one or more virtual machines; and determining resource allocation of the platform device to said one or more virtual machines based on the change in operation.

4. The method of claim 1 further comprising notifying a guest operating system before modifying a power consumption state of the platform device.

5. The method of claim 1 wherein the platform device is a power-manageable platform device.

6. The method of claim 1 wherein the platform device is a non-power-manageable platform device.

7. The method of claim 1 further comprising: observing that one of said one or more virtual machines is quiescent; saving the state of the one of said one or more virtual machines; and stopping the one of said one or more virtual machines to free resources allocated to the one of said one or more virtual machines.

8. The method of claim 1 further comprising: observing that none of said one or more virtual machines is quiescent; determining which subsets of said one or more virtual machines can remain active without exceeding the power available to the computing platform; selecting a subset that has a maximum value to a user from the subsets of said one or more virtual machines; saving the state of each virtual machine that is not included in the subset that has the maximum value to the user; and stopping said each virtual machine to free resources allocated to said each virtual machine.

9. The method of claim 8 wherein the subset that has the maximum value to the user is selected based on a policy specified by the user.

10. The method of claim 9 further comprising receiving notification of the policy from an application running in one of said one or more VMs.

11. The method of claim 7 further comprising reconstructing the state of said one or more virtual machines upon receiving a resource request from said one or more virtual machines.

12. The method of claim 1 wherein any of said one or more virtual machines runs a guest operating system that lacks the capacity to handle power-management signals sent by a computing platform.

13. The method of claim 12 further comprising: intercepting a power-management signal sent by the computing platform to the guest operating system; and preserving the state of a corresponding virtual machine if the power-management signal indicates that the computing platform will be powered down.

14. A system comprising: a computing platform to implement, at least, a virtual machine monitor (VMM) and one or more virtual machines; the VMM to monitor utilization of a platform device by said one or more virtual machines, to identify a decrease in power available to the computing platform, and to managepower consumption of the platform device based on the monitoring upon the identified decrease in available power.

15. The system of claim 14 wherein the VMM is to monitor utilization of the platform device by determining resource allocation of the platform device to each of said one or more virtual machines when each of said one or more virtual machines is either started or stopped.

16. The system of claim 14 wherein the VMM is to monitor utilization of the platform device by identifying a change in operation of said one or more virtual machines and determining resource allocation of the platform device to said one or more virtual machines based on the change in operation.

17. An apparatus for providing power management, the apparatus comprising: a resource watch module to monitor utilization of a platform device within a computing platform by one or more virtual machines; and a virtual machine monitor (VMM) coupled with the resource watch module, the VMM is to identify a decrease in power available to the computing platform, and to manage power consumption of the platform device based on the monitoring upon the identified decrease in available power.

18. The apparatus of claim 17 wherein the resource watch module is to determine resource allocation of the platform device to each of said one or more virtual machines when each of said one or more virtual machines is either started or stopped.

19. The apparatus of claim 17 wherein the resource watch module is to identify a change in operation of said one or more virtual machines and to determine resource allocation of the platform device to said one or more virtual machines based on the change in operation.

20. The apparatus of claim 17 wherein the VMM is to notify a guest operating system before modifying a power consumption state of the platform device.

21. The apparatus of claim 17 wherein the platform device is a power-manageable platform device.

22. The apparatus of claim 17 wherein the platform device is a non-power-manageable platform device.

23. The apparatus of claim 17 wherein the VMM is to observe that one of said one or more virtual machines is quiescent; save the state of the one of said one or more virtual machines; and stop the one of said one or more virtual machines to free resources allocated to the one of said one or more virtual machines.

24. The apparatus of claim 17 wherein the VMM is to further observe that none of said one or more virtual machines is quiescent, determine which subsets of said one or more virtual machines can remain active without exceeding the power available to the computing platform, select a subset that has a maximum value to a user from the subsets of said one or more virtual machines, save the state of each virtual machine that is not included in the subset that has the maximum value to the user, and stop said each virtual machine to free resources allocated to said each virtual machine.

25. The apparatus of claim 24 wherein the subset that has the maximum value to the user is selected based on a policy specified by the user.

26. The apparatus of claim 25 wherein the VMM is to receive a notification of the policy from an application running in one of said one or more VMs.

27. The apparatus of claim 17 wherein any of said one or more virtual machines runs a guest operating system that lacks the capacity to handle power-management signals sent by a computing platform.

28. The apparatus of claim 27 wherein the VMM is to intercept a power-management signal sent by the computing platform to the guest operating system and to preserve the state of a corresponding virtual machine if the power-manageable signal indicates that the computing platform will be powered down.

29. A computer readable medium that provides instructions, which when executed on a processor, cause said processor to perform operations comprising: a virtual machine monitor (VMM) monitoring utilization of a platform device within a computing platform by one or more other virtual machines; the VMM identifying a decrease in power available to the computing platform; and the VMM managing power consumption of the platform device based on the monitoring upon the identified decrease in available power.

30. The computer readable medium of claim 29 providing further instructions causing the processor to perform operations comprising: observing that said one or more virtual machines are quiescent; saving the state of said one or more virtual machines; and stopping said one or more virtual machines to free resources allocated to said one or more virtual machines.

31. The computer readable medium of claim 29 comprising further instructions causing the processor to perform operations comprising: intercepting a power-management signal sent by the computing platform to a guest operating system; and preserving the state of a corresponding virtual machine if the power-management signal indicates that the computing platform will be powered down.

Description

FIELD OF THE INVENTION

The present invention relates generally to virtual machines, and more specifically to providing power management via a virtual machine monitor.

BACKGROUND OF THE INVENTION

A conventional virtual machine monitor (VMM) runs on a computer, hereafter called the "host platform", and presents to other software the abstraction of one or more virtual machines (VMs). Each VM functions as a self-contained computer, running its own "guest operating system" (guest OS), which can be a standard OS for the computer being virtualized (e.g., Microsoft.RTM. Windows.RTM. for a Personal Computer). Currently, each guest OS is responsible for solving power management problems. However, some OSes are unable to manage the power consumed by the host platform because they are not equipped to handle power-management signals sent by host platform hardware. In addition, the guest OS expects to run on a dedicated computer rather than in a VM and is unaware of other VMs that may be running on the same host platform. As a result the guest OS may, in its attempts to provide power management of the VM that it is running in, conflict with the power management actions or expectations of other guest OSes running in other VMs. Accordingly, guest OSes running in multiple VMs cannot be allowed to directly provide power management of host platform hardware resources.

Therefore, there is a need for an alternative power management mechanism that will provide more efficient use of computing resources in a virtual machine environment.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention is illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which like reference numerals refer to similar elements and in which:

FIG. 1 is a block diagram of a system for providing power management via virtualization, according to one embodiment of the present invention;

FIG. 2 is a flow diagram of a method for providing power management, according to one embodiment of the present invention;

FIG. 3 is a flow diagram of a method for reducing resource requirements of virtual machines, according to one embodiment of the present invention;

FIG. 4 is a flow diagram of a method for assisting a guest operating system, according to one embodiment of the present invention; and

FIG. 5 is a block diagram of one embodiment of a processing system.

DESCRIPTION OF THE EMBODIMENTS

A method and apparatus for providing power management via virtualization are described. In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It will be apparent, however, to one skilled in the art that the present invention can be practiced without these specific details.

Some portions of the detailed descriptions which follow are presented in terms of algorithms and symbolic representations of operations on data bits within a computer memory. These algorithmic descriptions and representations are the means used by those skilled in the data processing arts to most effectively convey the substance of their work to others skilled in the art. An algorithm is here, and generally, conceived to be a self-consistent sequence of steps leading to a desired result. The steps are those requiring physical manipulations of physical quantities. Usually, though not necessarily, these quantities take the form of electrical or magnetic signals capable of being stored, transferred, combined, compared, and otherwise manipulated. It has proven convenient at times, principally for reasons of common usage, to refer to these signals as bits, values, elements, symbols, characters, terms, numbers, or the like.

It should be borne in mind, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically stated otherwise as apparent from the following discussions, it is appreciated that throughout the present invention, discussions utilizing terms such as "processing" or "computing" or "calculating" or "determining" or "displaying" or the like, may refer to the action and processes of a computer system, or similar electronic computing device, that manipulates and transforms data represented as physical (electronic) quantities within the computer system's registers and memories into other data similarly represented as physical quantities within the computer system memories or registers or other such information storage, transmission or display devices.

The present invention also relates to apparatus for performing the operations herein. This apparatus may be specially constructed for the required purposes, or it may comprise a general purpose computer selectively activated or reconfigured by a computer program stored in the computer. Such a computer program may be stored in a computer readable storage medium, such as, but is not limited to, any type of disk including floppy disks, optical disks, CD-ROMs, and magnetic-optical disks, read-only memories (ROMs), random access memories (RAMs), EPROMs, EEPROMs, magnetic or optical cards, or any type of media suitable for storing electronic instructions, and each coupled to a computer system bus. Instructions are executable using one or more processing devices (e.g., processors, central processing units, etc.).

The algorithms and displays presented herein are not inherently related to any particular computer or other apparatus. Various general purpose machines may be used with programs in accordance with the teachings herein, or it may prove convenient to construct more specialized apparatus to perform the required method steps. The required structure for a variety of these machines will appear from the description below. In addition, the present invention is not described with reference to any particular programming language. It will be appreciated that a variety of programming languages may be used to implement the teachings of the invention as described herein.

In the following detailed description of the embodiments, reference is made to the accompanying drawings that show, by way of illustration, specific embodiments in which the invention may be practiced. In the drawings, like numerals describe substantially similar components throughout the several views. These embodiments are described in sufficient detail to enable those skilled in the art to practice the invention. Other embodiments may be utilized and structural, logical, and electrical changes may be made without departing from the scope of the present invention. Moreover, it is to be understood that the various embodiments of the invention, although different, are not necessarily mutually exclusive. For example, a particular feature, structure, or characteristic described in one embodiment may be included within other embodiments. The following detailed description is, therefore, not to be taken in a limiting sense, and the scope of the present invention is defined only by the appended claims, along with the full scope of equivalents to which such claims are entitled.

The method and apparatus of the present invention provide a power management mechanism that can be used in a virtual machine environment. FIG. 1 illustrates a system 100 for providing power management via virtualization, according to one embodiment of the present invention. In this embodiment, host platform 108 is a computing platform that comprises electronic hardware. In one embodiment, the electronic hardware consists of one or more power-manageable devices. These power-manageable devices may include, for example, a disk drive, a processor, or any other device capable of operating in a mode other than ON and OFF modes. For instance, a disk drive may be commanded to enter a sleep state in which the platters stop rotating, or a processor may be commanded to enter one of several power-consumption modes. The power consumption of the processor may be reduced by simultaneously reducing the voltage and frequency supplied, although other mechanisms for reducing the power consumption of the processor may be employed. In another embodiment, the host platform 108 also includes non-power-manageable devices. Such devices can typically operate either in ON mode or OFF mode and do not have a reduced power-consumption state.

The host platform 108 is capable of executing a virtual machine monitor (VMM) 104. The VMM 104, though typically implemented in software, exports a bare machine interface to higher level software. The interface exported by VMM 104 to the multiple VMs 102 may mirror the actual platform, so that it is virtualized, or it may differ in some or all respects so that a different platform is emulated. Such higher level software may comprise a standard or real-time OS, although the invention is not limited in scope in this respect and, alternatively, for example, the VMM 104 may be run within, or on top of, another VMM. VMMs and their typical features and functionality are well-known by those skilled in the art and may be implemented, for example, in software, firmware or by a combination of various techniques.

As described above, the VMM 104 presents to other software (i.e., "guest" software) the abstraction of one or more virtual machines (VMs). FIG. 1 shows multiple VMs 102. Each VM 102 runs its own guest operating system (guest OS). In one embodiment, all guest OSes are capable of handling power-management signals sent by the host platform 108. In another embodiment, none of the guest OSes in the system 100 is capable of handling such signals. For instance, if the guest OS was developed before power-management features were added to a particular device or class of devices, said guest OS would not typically be able to adjust the power setting of that device. In yet another embodiment, one or more VMs 102 run guest OSs that have the capacity of handling the power-manageable signals and the remaining VMs 102 run guest OSs that lack such capacity.

The guest OS is provided with the illusion of executing on the host platform, rather than in a virtual platform. In one embodiment, the virtual abstraction presented to the guest OS matches the characteristics of the host platform 108. Alternatively, the virtual abstraction presented to the guest OS differs from the characteristics of the host platform 108.

The VMM 104 provides protection between VMs 102 and observes the activities of the VMs 102. In one embodiment, the VMM 104 includes a resource watch module 106 which monitors utilization of host platform devices by the VMs 102 and provides input pertaining to the allocation of the host resources to the VMM 104. Based on this input, the VMM 104 manages power consumption of physical devices within the host platform 108. For instance, the resource watch module 106 may determine that a particular power-manageable device is not being utilized and provide this information to the VMM 104. The VMM 104 may then place this device in a reduced power-consumption state.

In one embodiment, the resource watch module 106 observes utilization of host platform devices whenever any VM 102 is started or stopped. In one embodiment, the resource watch module 106 determines that the VM 102 executes an application that does not require a certain device (e.g., a display device). The resource watch module 106 notifies the VMM 104 about this determination. The VMM 104 then provides to the corresponding guest OS only the abstraction of the remaining host platform devices rather than the entire host platform 108. In another embodiment, if the resource watch module 106 determines that the resources of a particular platform device have not been allocated to any of the VMs 102, the VMM 104 commands this device to enter a reduced power-consumption mode.

In an alternative embodiment, the resource watch module 106 constantly monitors the utilization of the host platform devices by the VMs 102. This embodiment is referred to herein as a dynamic power management of the host platform 108. FIG. 2 is a flow diagram of a method 200 for providing dynamic power management, according to one embodiment of the present invention.

Referring to FIG. 2, method 200 begins with monitoring requests for computing resources of a host platform. The resource requests are initiated by one or more VMs. At processing block 206, the utilization of a host platform device is determined using the requests of one or more VMs for computing resources. In one embodiment, the utilization of the device by the VMs is determined by identifying a change in the operation of one or more VMs and deciding whether the change in the operation will affect the utilization of the device.

At decision box 208, a determination is made as to whether the device is fully utilized. If the determination is positive, i.e., the VMs fully utilize the capacity of the device, then the power-consumption state of the device remains unchanged. Otherwise, the power-consumption state of the device is modified (processing block 210). For instance, if the determination is made that the device is under-utilized, the device is placed in a reduced power-consumption state. Alternatively, the power-consumption state of the device may be modified to allocate more resources of the device to the VMs.

In one embodiment, the VMM notifies one or more VMs that support such a notification about the modification of the power-consumption state of the device. For those VMs that do not support the notification, the guest OSs may experience longer latencies when accessing the device that has been placed in a reduced power-consumption state.

FIG. 3 is a flow diagram of a method 300 for reducing resource requirements of VMs, according to one embodiment of the present invention. In this embodiment, if the power available to the host platform decreases, method 300 allows reducing the resource requirements of VMs by stopping one or more VMs that are not being used.

Referring to FIG. 3, method 300 begins with identifying a decrease in the power available to the host platform (processing block 304). For instance, the decrease may occur because the host platform is reduced from AC power and is now running on battery power. At decision box 306, a determination is made as to whether any of the VMs is quiescent. If the determination is positive, i.e., a quiescent VM is found, the VMM then saves the current state information of this VM (processing block 308) and stops this VM (processing block 310). As a result, the resources allocated to the VM are freed. The VMM may then reduce the power consumption of one or more devices which were partially or fully allocated to the saved VM, thereby adjusting to the decrease in the available power. If more than one quiescent VMs are found, the VMM may save and stop as many of these quiescent VMs as necessary to avoid exceeding the power available to the host platform. Then, at decision box 312, a determination is made as to whether the VMs that remain active still exceed the power available to the host platform. If the determination is negative, method 300 stops. Otherwise, method 300 proceeds to processing block 314.

If either the determination made at decision box 306 is negative (i.e., none of the VMs is quiescent) or the determination made at decision box 312 is positive (i.e., after one or more quiescent VMs have been stopped, the remaining VMs still exceed the power available to the host platform), then the active VMs are examined. In particular, at processing box 314, the VMM determines which subsets of the active VMs can remain active without exceeding the power available to the host platform. For instance, the VMM may make this determination by evaluating all possible combinations of the active VMs and determining these VMs' resource requirements. Each subset of VMs may contain one or more VMs; in addition the empty set (i.e., the set of no VMs) may be included to guarantee that there is at least one subset of VMs does not exceed the power available to the host platform.

Next, at processing box 316, the VMM selects the subset that has the most value to the user from the subsets of VMs identified at processing block 314 using a policy pertaining to user preferences with respect to the VMs. In one embodiment, the policy pertaining to user preferences is predetermined (e.g., defined by the computer manufacturer). Alternatively, the user is provided with an opportunity to specify his or her desired policy regarding the VMs. For instance, the user may specify the desired policy in advance (i.e., statically) or at the time the most valuable subset of VMs is being selected (i.e., dynamically). In one embodiment, the user's desired policy regarding a particular VM is maintained by an application (e.g., a resource management application) running in this VM. The application can then communicate this policy to the VMM at any appropriate point of time.

Further, all the active VMs other than the VMs selected at processing block 316 are saved and stopped. That is, the states of these VMs are saved (processing block 318) and the VMs are stopped to free the resources allocated to these VMs (processing block 320).

Subsequently, when any of the VMs that were stopped becomes active, the VMM restores the state of this VM using the saved state information. Accordingly, the VMM is able to balance between resource requirements of multiple VMs and available resources of the host platform.

FIG. 4 is a flow diagram of a method 400 for assisting a guest OS that is not aware of power-management, according to one embodiment of the present invention. As described above, some guest OSs may not be equipped to handle power-manageable signals sent by the host platform. These guest OSs are referred to herein as non-power-management-aware guest OSs. In one embodiment, the VMM assists such guest OSs by intercepting the power-management signals sent by the host platform and preserving the state of the corresponding VM when necessary. Method 400 illustrates this embodiment of the present invention using an exemplary scenario of low battery. It should be noted that method 400 should not be limited to this particular scenario and may be used to assist the guest OS in various other situations without loss of generality.

Method 400 begins with intercepting a power-management signal sent to the VM that runs a non-power-management-aware guest OS (processing block 404). At decision box 406, a determination is made as to whether this signal indicates that the battery used for the host platform is low. If the determination is negative, the VMM takes no actions, and method 400 ends.

Alternatively, if the determination is positive, the VMM saves the state information of the VM (processing block 408) and powers down the host platform (processing block 410). Subsequently, when the host platform is powered up, the VMM restores the state of the VM using the saved state information. Accordingly, the VMM prevents the non-power-management-aware guest OS from losing data during the power-down state of the host platform.

FIG. 5 is a block diagram of one embodiment of a processing system. Processing system 500 includes processor 520 and memory 530. Processor 520 can be any type of processor capable of executing software, such as a microprocessor, digital signal processor, microcontroller, or the like. Processing system 500 can be a personal computer (PC), mainframe, handheld device, portable computer, set-top box, or any other system that includes software.

Memory 530 can be a hard disk a floppy disk, random access memory (RAM), read only memory (ROM), flash memory, or any other type of machine medium readable by processor 520. Memory 530 can store instructions 540 for performing the execution of the various method embodiments of the present invention such as methods 200, 300 and 400 (FIGS. 2 4).

It is to be understood that the above description is intended to be illustrative, and not restrictive. Many other embodiments will be apparent to those of skill in the art upon reading and understanding the above description. The scope of the invention should, therefore, be determined with reference to the appended claims, along with the full scope of equivalents to which such claims are entitled.

* * * * *