The present invention relates generally to virtual machines, and more specifically to providing power management via a virtual machine monitor.
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® Windows® 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.
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:
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.
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).
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.
Referring to
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.
Referring to
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.
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.
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 (
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.
Number | Name | Date | Kind |
---|---|---|---|
3699532 | Schaffer et al. | Oct 1972 | A |
3996449 | Attanasio et al. | Dec 1976 | A |
4037214 | Birney et al. | Jul 1977 | A |
4162536 | Morley | Jul 1979 | A |
4207609 | Luiz et al. | Jun 1980 | A |
4247905 | Yoshida et al. | Jan 1981 | A |
4276594 | Morley | Jun 1981 | A |
4307447 | Provanzano et al. | Dec 1981 | A |
4319233 | Matsuoka et al. | Mar 1982 | A |
4319323 | Ermolovich et al. | Mar 1982 | A |
4347565 | Kaneda et al. | Aug 1982 | A |
4403283 | Myntti et al. | Sep 1983 | A |
4419724 | Branigin et al. | Dec 1983 | A |
4430709 | Schleupen | Feb 1984 | A |
4571672 | Hatada et al. | Feb 1986 | A |
4621318 | Maeda | Nov 1986 | A |
4759064 | Chaum | Jul 1988 | A |
4795893 | Ugon | Jan 1989 | A |
4802084 | Ikegaya et al. | Jan 1989 | A |
4825052 | Chemin et al. | Apr 1989 | A |
4907270 | Hazard | Mar 1990 | A |
4907272 | Hazard | Mar 1990 | A |
4910774 | Barakat | Mar 1990 | A |
4975836 | Hirosawa et al. | Dec 1990 | A |
5007082 | Cummins | Apr 1991 | A |
5079737 | Hackbarth | Jan 1992 | A |
5187802 | Inoue et al. | Feb 1993 | A |
5230069 | Brelsford et al. | Jul 1993 | A |
5237616 | Abraham et al. | Aug 1993 | A |
5287363 | Wolf et al. | Feb 1994 | A |
5295251 | Wakui et al. | Mar 1994 | A |
5317705 | Gannon et al. | May 1994 | A |
5319760 | Mason et al. | Jun 1994 | A |
5361375 | Ogi | Nov 1994 | A |
5386552 | Garney | Jan 1995 | A |
5434999 | Goire et al. | Jul 1995 | A |
5437033 | Inoue et al. | Jul 1995 | A |
5442645 | Ugon et al. | Aug 1995 | A |
5455909 | Blomgren et al. | Oct 1995 | A |
5459867 | Adams et al. | Oct 1995 | A |
5469557 | Salt et al. | Nov 1995 | A |
5504922 | Seki et la. | Apr 1996 | A |
5506975 | Onodera | Apr 1996 | A |
5511217 | Nakajima et al. | Apr 1996 | A |
5522075 | Robinson et al. | May 1996 | A |
5528231 | Patarin | Jun 1996 | A |
5533126 | Hazard et al. | Jul 1996 | A |
5555385 | Osisek | Sep 1996 | A |
5555414 | Hough et al. | Sep 1996 | A |
5560013 | Scalzi et al. | Sep 1996 | A |
5564040 | Kubals | Oct 1996 | A |
5566323 | Ugon | Oct 1996 | A |
5574936 | Ryba et al. | Nov 1996 | A |
5582717 | Di Santo | Dec 1996 | A |
5590342 | Marisetty | Dec 1996 | A |
5604805 | Brands | Feb 1997 | A |
5606617 | Brands | Feb 1997 | A |
5628022 | Ueno et al. | May 1997 | A |
5633929 | Kaliski, Jr. | May 1997 | A |
5668971 | Neufeld | Sep 1997 | A |
5684948 | Johnson et al. | Nov 1997 | A |
5706469 | Kobayashi | Jan 1998 | A |
5720609 | Pfefferle | Feb 1998 | A |
5721222 | Bernstein et al. | Feb 1998 | A |
5737604 | Miller et al. | Apr 1998 | A |
5737760 | Grimmer, Jr. et al. | Apr 1998 | A |
5740178 | Jacks et al. | Apr 1998 | A |
5752046 | Oprescu et al. | May 1998 | A |
5757604 | Bennett et al. | May 1998 | A |
5757919 | Herbert et al. | May 1998 | A |
5784628 | Reneris | Jul 1998 | A |
5796835 | Saada | Aug 1998 | A |
5809546 | Greenstein et al. | Sep 1998 | A |
5825875 | Ugon | Oct 1998 | A |
5825880 | Sudia et al. | Oct 1998 | A |
5852717 | Bhide et al. | Dec 1998 | A |
5854913 | Goetz et al. | Dec 1998 | A |
5867577 | Patarin | Feb 1999 | A |
5872994 | Akiyama et al. | Feb 1999 | A |
5900606 | Rigal | May 1999 | A |
5901225 | Ireton et al. | May 1999 | A |
5903752 | Dingwall et al. | May 1999 | A |
5919257 | Trostle | Jul 1999 | A |
5935242 | Madany et al. | Aug 1999 | A |
5935247 | Pai et al. | Aug 1999 | A |
5944821 | Angelo | Aug 1999 | A |
5953502 | Helbig, Sr. | Sep 1999 | A |
5953536 | Nowlin, Jr. | Sep 1999 | A |
5956408 | Arnold | Sep 1999 | A |
5970147 | Davis | Oct 1999 | A |
5978475 | Schneier et al. | Nov 1999 | A |
6035374 | Panwar et al. | Mar 2000 | A |
6044478 | Green | Mar 2000 | A |
6055637 | Hudson et al. | Apr 2000 | A |
6061794 | Angelo et al. | May 2000 | A |
6075938 | Bugnion et al. | Jun 2000 | A |
6085296 | Karkhanis | Jul 2000 | A |
6088262 | Nasu | Jul 2000 | A |
6092095 | Maytal | Jul 2000 | A |
6093213 | Favor et al. | Jul 2000 | A |
6101584 | Satou et al. | Aug 2000 | A |
6108644 | Goldschlag et al. | Aug 2000 | A |
6115816 | Davis | Sep 2000 | A |
6125430 | Noel et al. | Sep 2000 | A |
6131166 | Wong-Insley | Oct 2000 | A |
6148379 | Schimmel | Nov 2000 | A |
6173417 | Merrill | Jan 2001 | B1 |
6175924 | Arnold | Jan 2001 | B1 |
6182089 | Ganapathy et al. | Jan 2001 | B1 |
6188257 | Buer | Feb 2001 | B1 |
6192455 | Bogin et al. | Feb 2001 | B1 |
6199152 | Kelly et al. | Mar 2001 | B1 |
6212635 | Reardon | Apr 2001 | B1 |
6222923 | Schwenk | Apr 2001 | B1 |
6249872 | Wildgrube et al. | Jun 2001 | B1 |
6252650 | Nakamura | Jun 2001 | B1 |
6269392 | Cotichini et al. | Jul 2001 | B1 |
6272533 | Browne | Aug 2001 | B1 |
6272637 | Little et al. | Aug 2001 | B1 |
6275933 | Fine et al. | Aug 2001 | B1 |
6282650 | Davis | Aug 2001 | B1 |
6292874 | Barnett | Sep 2001 | B1 |
6301646 | Hostetter et al. | Oct 2001 | B1 |
6308270 | Guthery | Oct 2001 | B1 |
6314409 | Schneck et al. | Nov 2001 | B2 |
6321314 | Van Dyke | Nov 2001 | B1 |
6327652 | England et al. | Dec 2001 | B1 |
6330670 | England et al. | Dec 2001 | B1 |
6339815 | Feng et al. | Jan 2002 | B1 |
6339816 | Bausch | Jan 2002 | B1 |
6357004 | Davis | Mar 2002 | B1 |
6363485 | Adams et al. | Mar 2002 | B1 |
6374286 | Gee et al. | Apr 2002 | B1 |
6374317 | Ajanovic et al. | Apr 2002 | B1 |
6378068 | Foster | Apr 2002 | B1 |
6378072 | Collins et al. | Apr 2002 | B1 |
6389537 | Davis et al. | May 2002 | B1 |
6397242 | Devine et al. | May 2002 | B1 |
6397379 | Yates et al. | May 2002 | B1 |
6412035 | Webber | Jun 2002 | B1 |
6421702 | Gulick | Jul 2002 | B1 |
6435416 | Slassi | Aug 2002 | B1 |
6445797 | McGough et al. | Sep 2002 | B1 |
6463535 | Drews et al. | Oct 2002 | B1 |
6463537 | Tello | Oct 2002 | B1 |
6499123 | McFarland et al. | Dec 2002 | B1 |
6505279 | Phillips et al. | Jan 2003 | B1 |
6507904 | Ellison et al. | Jan 2003 | B1 |
6529909 | Bowman-Amuah | Mar 2003 | B1 |
6535988 | Poisner | Mar 2003 | B1 |
6557104 | Vu et al. | Apr 2003 | B2 |
6560627 | McDonald et al. | May 2003 | B1 |
6609199 | DeTreville | Aug 2003 | B1 |
6615278 | Curtis | Sep 2003 | B1 |
6633963 | Ellison et al. | Oct 2003 | B1 |
6633981 | Davis | Oct 2003 | B1 |
6651171 | England et al. | Nov 2003 | B1 |
6678825 | Ellison et al. | Jan 2004 | B1 |
6684326 | Cromer et al. | Jan 2004 | B1 |
6763454 | Wilson et al. | Jul 2004 | B2 |
6901522 | Buch | May 2005 | B2 |
20010021969 | Burger et al. | Sep 2001 | A1 |
20010027511 | Wakabayashi et al. | Oct 2001 | A1 |
20010027527 | Khidekel et al. | Oct 2001 | A1 |
20020007456 | Peinado et al. | Jan 2002 | A1 |
20020023032 | Pearson et al. | Feb 2002 | A1 |
20020147916 | Strongin et al. | Oct 2002 | A1 |
20020166061 | Falik et al. | Nov 2002 | A1 |
20020169717 | Challener | Nov 2002 | A1 |
20030018892 | Tello | Jan 2003 | A1 |
20030074548 | Cromer et al. | Apr 2003 | A1 |
20030115453 | Grawrock | Jun 2003 | A1 |
20030126442 | Glew et al. | Jul 2003 | A1 |
20030126453 | Glew et al. | Jul 2003 | A1 |
20030159056 | Cromer et al. | Aug 2003 | A1 |
20030188179 | Challener et al. | Oct 2003 | A1 |
20030196085 | Lampson et al. | Oct 2003 | A1 |
20040117539 | Bennett et al. | Jun 2004 | A1 |
Number | Date | Country |
---|---|---|
42177444 | Dec 1992 | DE |
0473913 | Mar 1992 | EP |
0600112 | Jun 1994 | EP |
0602867 | Jun 1994 | EP |
0 892 521 | Jan 1999 | EP |
0930567 | Jul 1999 | EP |
0 965 902 | Dec 1999 | EP |
0961193 | Dec 1999 | EP |
1030237 | Aug 2000 | EP |
1 055 989 | Nov 2000 | EP |
1 056 014 | Nov 2000 | EP |
1 085 396 | Mar 2001 | EP |
1146715 | Oct 2001 | EP |
1209563 | May 2002 | EP |
1 271 777 | Jan 2003 | EP |
76139 | Mar 2000 | JP |
WO 9524696 | Sep 1995 | WO |
WO 9812620 | Sep 1996 | WO |
WO 9729567 | Aug 1997 | WO |
WO 9834365 | Aug 1998 | WO |
WO 9844402 | Oct 1998 | WO |
WO 9905600 | Feb 1999 | WO |
WO 9909482 | Feb 1999 | WO |
WO 9918511 | Apr 1999 | WO |
WO 9957863 | Nov 1999 | WO |
WO 9965579 | Dec 1999 | WO |
WO-0021238 | Apr 2000 | WO |
WO 0062232 | Oct 2000 | WO |
WO 0127723 | Apr 2001 | WO |
WO 0127821 | Apr 2001 | WO |
WO 0163994 | Aug 2001 | WO |
WO 01 75564 | Oct 2001 | WO |
WO 0175565 | Oct 2001 | WO |
WO 0175595 | Oct 2001 | WO |
WO 0201794 | Jan 2002 | WO |
WO 02 17555 | Feb 2002 | WO |
WO 02060121 | Aug 2002 | WO |
WO 02 086684 | Oct 2002 | WO |
WO 03058412 | Jul 2003 | WO |
Number | Date | Country | |
---|---|---|---|
20020083110 A1 | Jun 2002 | US |