Report updated threshold level based on parameter

Example embodiments disclosed herein relate to reporting a first updated threshold level related to a battery. A parameter related to power to be drawn by the computing device for the first OS to enter a hibernate state is monitored. The first updated threshold level are set based on the parameter. The first updated threshold level is reported to the first OS. The first OS is to vary the first battery level threshold based on the first updated threshold level.

BACKGROUND

Mobile devices, such as notebook computers, may be powered by a battery. Software, such as an operating system (OS) running on the mobile device, may gauge an actual remaining battery capacity of the battery. Should the actual remaining battery capacity fall below a battery level threshold, the OS may enter an inactive state, such as a hibernate state. Before entering the hibernate state, the OS may carry out operations to preserve data, such as saving data of a volatile memory to a non-volatile memory of the mobile device.

The battery level threshold is set by the OS to ensure that the actual remaining battery capacity of the battery is sufficient to power a transition of the mobile device to the hibernate state.

DETAILED DESCRIPTION

Devices, such as notebook computers or tablet computers, may be powered by a battery. These devices often run software, such as an operating system (OS), which monitors an actual remaining battery capacity of the battery through an Advanced Configuration and Power Interface (ACPI). The ACPI may provide an interface between the OS and hardware and/or firmware, such as the basic input/output system (BIOS), to allow the OS to control a power state of the device. For example, the OS may compare the actual remaining battery capacity received via the BIOS and/or ACPI to a battery level threshold to determine if the actual remaining battery capacity of the battery is low. When the actual remaining battery capacity falls below the battery level threshold, the OS may enter an inactive state, such as a hibernate state. The hibernate state may refer to an inactive state in which contents of a volatile memory, such as a RAM, are written to a non-volatile memory, such as a hard disk drive, before powering down one or more components of the device, such as the RAM. When the OS wakes from the hibernate state, the contents of the volatile memory are reloaded, such as to the RAM, and the device is restored to its state previous to entering the hibernate state.

A manufacturer may determine the battery level threshold and then apply the battery level threshold to an entire platform of one or more devices. If the battery level threshold is set to too low, the battery may not have sufficient energy to power a transition of the OS to the hibernate state. Thus, the battery level threshold is often set conservatively to a relatively high level to ensure that that the battery stores sufficient energy to power a transition of the OS to the hibernate state. However, as a result, the battery may still retain enough energy to have powered the OS for a longer time before entering the hibernate state. Hence, the OS may prematurely enter the hibernate state, thus reducing a time the device is in the active state and usable by a user.

Accordingly, various embodiments dynamically vary at least one of a actual remaining battery capacity of the battery reported to the OS and a battery level threshold of the OS based on an estimated power to be drawn by the device in order to maximize or extend a time before the device is to enter the hibernate state. For example, embodiments may monitor parameters such as an amount of memory to be saved, an age and condition of the device, a speed and temperature of components of the device, complexity of software running on the device, the capacity of the battery and the like. These parameters may be used to increase or decrease a value of the actual remaining battery capacity reported to the OS and/or the battery level threshold of the OS, in order to delay a time before the OS is to enter the hibernate state and to maximize or extend an active state of the OS.

Referring now to the drawings,FIG. 1is an example block diagram of a computing device100. In one embodiment the computing device100can report a modified remaining battery capacity to the first OS145. In another embodiment the computing device can report a first updated threshold level to a first OS145. In another embodiment the computing device100can report either or both of the modified remaining battery capacity and a first updated threshold level to a first OS145. Embodiments of the computing device100may include, for example, a notebook computer, a desktop computer, an all-in-one system, a slate computing device, a portable reading device, a wireless email device, a mobile phone, and the like. In the embodiment ofFIG. 1A, the computing device100includes a processor110, a first memory120, a battery130and a second memory140. The second memory140further includes an interface module141, a monitor module142, a level module143and the first OS145.

The battery130may include any type of power storage device, such as a rechargeable battery. For example, the battery may be a dry cell type battery having cells that include nickel-cadmium (NiCd), nickel-zinc (NiZn), nickel metal hydride (NiMH), lithium-ion (Li-ion), and the like. The computing device100may be powered by the battery130, such as when a power outlet (not shown) is not available. Further, the battery130may also be recharged via the power outlet.

The actual remaining battery capacity of the battery130may be reported by a chip (not shown) of the battery130which estimates a remaining power or energy of the battery130, such as via coulomb counting or voltage detection methods. Further, the actual remaining battery capacity may be expressed as a percentage of the total power capacity of the battery, a number of milliwatt hours, and the like.

The first and second memories120and140may be one or more machine-readable storage mediums such as any electronic, magnetic, optical, or other physical storage device that contains or stores executable instructions. Further, the first memory120may be a volatile type of memory, such as random access memory (RAM), including dynamic random access memory (DRAM) and static random access memory (SRAM). The second memory140may be a non-volatile type of memory, such as read-only memory, flash memory, magnetic computer storage devices like hard disks, floppy disks, magnetic tape, optical discs, etc.

The processor110may be a CPU, a GPU, or a microprocessor suitable for retrieval and execution of instructions from the second memory140and/or electronic circuits configured to perform the functionality of any of the modules141to143described below. For example, when one or more components of the computing device100are powered down, such as during the hibernate state, any information stored in the first memory120may be lost. Thus, the processor110may store information of the first memory120to a location of the second memory140before the first OS145is to enter the hibernate state. The term OS may refer to one or more programs that manage hardware resources, such as that of the first and second memories120and140, and/or support software applications.

Each of the modules141to143may include, for example, hardware devices including electronic circuitry for implementing the functionality described below. In addition or as an alternative, each module may be implemented as a series of instructions encoded on a machine-readable storage medium and executable by the processor110. In embodiments, some of the modules141to143may be implemented as hardware devices, while other modules are implemented as executable instructions.

The modules141to143may be implemented as part of an application run by an OS, such as the first OS145, and/or part of the ACPI. The interface module141is to receive a first battery level threshold from the first OS145running on the computing device100powered by the battery130. The monitor module142is to monitor a actual remaining battery capacity of the battery130and a parameter related to power to be drawn by the computing device100for the first OS145to enter the hibernate state.

The parameter monitored by the monitor module142may relate to a size and type of the information to be saved, a speed and reliability of at least one of the first and second memories120and140, a speed and temperature of the processor110, a capacity and age of the battery130, and/or the like. Thus, the parameter may vary with operation of the computing device100. For example, a value of the parameter may vary according to an amount of information stored at the first memory120, such as a RAM, and/or a temperature of the processor110at a given instance in time during which the computing device100is in a powered on state. The computing device100may include a sensor (not shown) to monitor the temperature of the processor110. The parameter will be explained in greater detail below with respect toFIGS. 4-5B.

The level module143is to extend a time before the first OS145is to enter a low power state for example the hibernate state by setting at least one of the first modified remaining battery capacity and the first updated threshold level. The first modified remaining battery capacity is set based on the received first battery level threshold, the monitored actual remaining battery capacity and the parameter. The first updated threshold level is to be set based on the parameter. Further, the interface module141is to report at least one of the first modified remaining battery capacity and the first updated threshold level to the first OS145.

The first OS145is to enter the hibernate state if the first modified remaining battery capacity is less than the first battery level threshold and the first OS145is to vary the first battery level threshold based on the first updated threshold level. For example, if the first updated threshold level is lower than the first battery level threshold, the first battery level threshold may be set to a lower level, thus delaying a time before the first OS145is to enter the hibernate state. Also, if the first modified remaining battery capacity is greater than the actual remaining battery capacity, the first OS145may wait longer to enter the hibernate state than if the first OS145had compared first battery level threshold to the actual remaining battery capacity of the battery130.

The interface module141may report the actual remaining battery capacity of the battery130to the first OS145if the interface module141does not report first modified value to the first OS145. The first OS145may interpret either of the reported first modified remaining battery capacity and the actual remaining battery capacity to be the actual remaining power of the battery130. Hence, the first OS145may enter the hibernate state if the actual remaining battery capacity of the battery130or the first modified remaining battery capacity is reported as less than the first battery level threshold.

For example, the first battery level threshold may be 4% of the battery capacity and the first modified remaining battery capacity may be set by the level module143to be, for example, 2% greater than the actual remaining battery capacity of the battery130. If the first modified remaining battery capacity is reported to the first OS145, the first OS145may not enter hibernate state until the first modified remaining battery capacity is 4%. Therefore, if the actual remaining battery capacity is 3% and the first modified remaining battery capacity is 5%, the computing device100may not enter the low power state. Hence, reporting the first modified remaining battery capacity instead of the actual remaining battery capacity of the battery130, can increase a time the first OS145is usable by a user and delay a time until the first OS145is to enter the hibernate state.

In an alternative embodiment, the first updated threshold level may be used to set the first battery level threshold to a different value. For example, if the reported first updated threshold level is 2%, the first OS145may change the first battery level threshold from 4% to 2%, thus allowing the first OS145to delay entering the hibernate state until the actual remaining battery capacity of the battery130or the first modified remaining battery capacity is reported as less than 2%.

The modules141to143may continuously monitor the actual remaining battery capacity and the parameters to dynamically vary at least one of the first modified remaining battery capacity and the first updated threshold level. An operation of the modules141to143will be explained in greater detail with respect toFIG. 3.

Further, the first OS145may also enter a sleep state upon receiving a sleep command from the user or from the first OS145if the first OS145is idle for a threshold time period. The sleep state may be similar to the hibernate state, except a volatile memory, such as the first memory120, may remain powered. Should the actual remaining battery capacity of the battery130become low during the sleep state, the first OS145may need to save temporary data, such as contents of first memory120, that would be lost if the computing device100powered down to an off state. However, the first OS145may not have an ability to save temporary data during the sleep state nor have an ability to directly transition to the hibernate to save the temporary data. Instead, the OS145may transition from the sleep state to an active state before entering the hibernate state.

Therefore, the OS145may not enter the sleep state unless the actual remaining battery capacity of the battery130is sufficient to both wake from sleep state and to transition to the hibernate state. Thus, in this case, the first OS145may enter a sleep state if the interface module141receives a sleep command and the first modified remaining battery capacity is greater than or equal to the first battery level threshold. The level module143may set the first modified remaining battery capacity such that a reserve of the battery130is sufficient to power the first OS145to enter and wake from the sleep state before entering the hibernate state.

WhileFIG. 1shows the modules141to143and the first OS145to be stored at a single memory location, such as the second memory140, embodiments are not limited thereto. For example, the modules141to143may be stored at a separate memory from the second memory140or at a separate partition, either physical or logical, of the second memory140.

FIG. 2is an example block diagram of a system200to report at least one of a first modified remaining battery capacity and a first updated threshold level to a first operating system145and at least one of a second modified remaining battery capacity and a second updated threshold level to a second operating system230. The system200ofFIG. 2may include components similar to that of the computing device100ofFIG. 1A. For example, the system200has hardware210including the processor110, the first memory120, the battery130and the second memory140. Further, system200includes the interface module141, the monitor module142, the level module143and the first OS145. However, the system200also includes a second OS230and a hypervisor220that includes the modules141to143. While the hypervisor220and the first and second OSs145and230are shown to be separate from the hardware210, embodiments may also include the hypervisor220and the first and second OSs145and230being internal to the hardware210, such as the second memory140.

The first and second OSs145and230may both be a same type of OS or each may be different types of OSs, such as any one of a Windows OS, a Linux OS, a Unix OS, and the like. Moreover, each of the first and second OSs145and230may be assigned to one or more different users. For example, the hardware210may be a server in which the first OS145is assigned to a first user and the second OS230is assigned to a second user.

In this embodiment, the modules141to143may be part of a type of software that allows the hardware210to run a plurality of OSs, where first OS145and second OS230may be virtual machines that are managed by the hypervisor220. The hypervisor220may interface between the hardware210, such as the first memory120and the battery130, and the virtual machines, such as the first OS145and/or the second OS230. The hypervisor220may include any type of hardware virtualization technique that allows multiple OSs to run concurrently as guests on a host device, such as the hardware210or the hypervisor could be an OS itself. A functionality of the hypervisor220may be flexible and determined according to a user's or manufacturer's specification. For example, the hypervisor220may launch and monitor the first OS145and/or the second OS230, such as via a process of the hypervisor220.

Similar toFIG. 1, the hypervisor220may report at least one of the first modified remaining battery capacity and the first updated threshold level to the first OS145. In addition, the hypervisor220may report at least one of the second modified remaining battery capacity and the second updated threshold level to the second OS230. The second OS230is to enter the hibernate state if the second modified remaining battery capacity is less than a second battery level threshold of the second OS. Further, the second OS is to vary the second battery level threshold based on the second updated threshold level.

When there are multiples OSs, such as the first OS145and the second OS230, running concurrently on the hardware210, all of the components of the hardware210may not enter the hibernate state if one of the first OS145and the second OS230does not enter the hibernate state. Instead, for example, the hypervisor220may determine which, if any components of the hardware210are to be accessed and/or powered down as a result of at least one of the first OS145and the second OS230entering the hibernate state. For instance, the hypervisor220may allow contents of the first memory120related to the first OS145to be saved to the second memory140when the first OS145is to enter the hibernate state. However, the hypervisor220may retain contents of the first memory120related to the second OS230if the second OS230is to not enter the hibernate state.

One of the first OS145and second OS230may not be aware that the battery130is being shared with another of the first OS145and second OS230. The hypervisor220may set the first and second modified remaining battery capacities to allocate the actual remaining battery capacity of the battery130between the first OS145and the second OS230. For example, the hypervisor220, via the level module143, may evenly split the actual remaining battery capacity of the battery130between the between the first and second modified remaining battery capacities. Alternatively, the hypervisor220may monitor parameters, such as a rate of activity or power consumption of at least one of the first and second OSs145and230, to aid in setting the first and second modified remaining battery capacities and/or the first and second updated threshold levels. An operation of the modules141to143with respect to multiple OSs, such as the first and second OSs145and230, will be explained in greater detail with respect toFIGS. 5A and 5B. Further, embodiments of the hardware210may include more or less virtual machines than described in the implementation.

FIG. 3is an example block diagram of a computing device300including instructions for reporting at least one of a first modified remaining battery capacity and a first updated threshold level to a first OS. In the embodiment ofFIG. 3, the computing device300includes a processor302, a battery306and a machine-readable storage medium310including instructions312,314,316and318for reporting at least one of the first modified remaining battery capacity and the first updated threshold level to the first OS (not shown).

The computing device300may be, for example, a chip set, a notebook computer, a slate computing device, a portable reading device, a wireless email device, a mobile phone, or any other device capable of executing the instructions312,314,316and318. In certain examples, the computing device300may include or be connected to additional components such, memories, sensors, displays, etc. For example, the computing device300may include a first memory (not shown) and a second memory (not shown) to store one or more OSs.

The processor302may be, at least one central processing unit (CPU), at least one semiconductor-based microprocessor, at least one graphics processing unit (GPU), other hardware devices suitable for retrieval and execution of instructions stored in the machine-readable storage medium310, or combinations thereof. The processor302may fetch, decode, and execute instructions312,314,316and318to implement the setting and reporting of at least one of the first modified remaining battery capacity and the first updated threshold level to the first OS145. As an alternative or in addition to retrieving and executing instructions, the processor302may include at least one integrated circuit (IC), other control logic, other electronic circuits, or combinations thereof that include a number of electronic components for performing the functionality of instructions312,314,316and318.

The machine-readable storage medium310may be any electronic, magnetic, optical, or other physical storage device that contains or stores executable instructions. Thus, the machine-readable storage medium310may be, for example, Random Access Memory (RAM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a storage drive, a Compact Disc Read Only Memory (CD-ROM), and the like. As such, the machine-readable storage medium310can be non-transitory. As described in detail below, machine-readable storage medium310may be encoded with a series of executable instructions for setting and reporting of at least one of the first modified remaining battery capacity and the first updated threshold level to the first OS.

Moreover, the instructions312,314,316and318when executed by a processor (e.g., via one processing element or multiple processing elements of the processor) can cause the processor to perform processes, such as, the process ofFIG. 4 or 5A and 5B. For example, the determine instructions312may be executed by the processor302to determine a first battery level threshold from the first OS running on the computing device300powered by the battery306. The monitor instructions314may be executed by the processor302to monitor an actual remaining battery capacity of the battery306and a parameter related to power drawn by the computing device300for the first OS to transition to a hibernate state. The parameter may vary with operation of the computing device300.

The extend instructions316may be executed by the processor302to a time before the first OS is to enter the hibernate state by setting at least one of a first modified remaining battery capacity and a first updated threshold level, the first modified remaining battery capacity to be set based on the determined first battery level threshold, the monitored actual remaining battery capacity and the parameter and the first updated threshold level to be set based on the parameter. The report instructions318may be executed by the processor302to report at least one of the first modified remaining battery capacity and the first updated threshold level to the first OS, the first OS to enter the hibernate state if the first modified remaining battery capacity is less than the first battery level threshold and the first OS to vary the first battery level threshold based on the first updated threshold level.

The machine-readable storage medium310may also include instructions (not shown) to determine to determine and report at least one a second modified remaining battery capacity and a second updated threshold level for a second OS, as described in more detail with respect toFIGS. 5A and 5B.

FIG. 4is an example flowchart of a method400for reporting at least one of a first modified remaining battery capacity and first updated threshold level to a first OS. Although execution of the method400is described below with reference to the computing device100, other suitable components for execution of the method400can be utilized, such as the system200or the device300. Additionally, the components for executing the method400may be spread among multiple devices (e.g., a processing device in communication with input and output devices). In certain scenarios, multiple devices acting in coordination can be considered a single device to perform the method400. The method400may be implemented in the form of executable instructions stored on a machine-readable storage medium, such as storage medium310, and/or in the form of electronic circuitry.

The computing device100receives a first battery level threshold from the first OS145running on the computing device100powered by the battery130. The computing device100also determines an actual remaining battery capacity of the battery130. At block410, the computing device100monitors a parameter related to power to be drawn by the computing device100if a first OS running on the computing device is to enter a hibernate state, the parameter to vary with operation of the computing device100. The blocks may be carried out in a different order and/or simultaneously.

At block420, the computing device100sets at least one of the first modified remaining battery capacity and the first updated threshold level based on a parameter. The first modified remaining battery capacity may be further set based on the first battery level threshold and the actual remaining battery capacity. At block430, the computing device100reports to first OS145at least one of the first modified remaining battery capacity in place of the actual remaining battery capacity and the first updated threshold level to replace the first battery level threshold. The first OS145is to enter the hibernate state if the reported first modified remaining battery capacity or actual remaining battery capacity is less than the first battery level threshold and the first OS145is to vary the first battery level threshold based on the first updated threshold level. Further, the first OS145is to enter a sleep state if the first OS145receives the sleep command and the reported first modified remaining battery capacity or actual remaining battery capacity is greater than or equal to the first battery level threshold. As noted above, the computing device100may report the actual remaining battery capacity instead of the first modified remaining battery capacity, such as when the computing device100is already reporting the first updated threshold level.

While the computing device100sets the first modified remaining battery capacity to extend a time before the first OS145is to enter the hibernate state, the computing device100also sets the first modified remaining battery capacity such that a reserve of the battery130is sufficient to power the first OS145to enter and wake from the sleep state before entering the hibernate state. For instance, the computing device100may monitor the parameter and determine that the computing device100may safely transition to the hibernate state with only a 2% actual remaining battery capacity of the battery130. However, the first battery level threshold of the first OS145may be 5%. Thus, in order to maximize or extend a time before the first OS145is to enter the hibernate state, the computing device100may report the first modified remaining battery capacity as 3% greater than the actual remaining battery capacity. Thus, the first OS145will enter the hibernation state only when the actual remaining battery capacity is 2%, and not 5%. Alternatively or in addition, the computing device100may set the first updated threshold level to 2%. The first OS145may then change the first battery level threshold to 2% upon receiving the reported first updated threshold level.

In one embodiment, monitoring the parameter may include monitoring an amount of information from a memory to be saved, with the computing device100to set the first modified remaining battery capacity to vary relative to the actual remaining battery capacity based on the amount of information to be saved. For example, at block410, the computing device100may monitor the information to be saved from the first memory120to the second memory140before entering the hibernate state. In this case, the computing device100may estimate or determine an amount of power needed to save the information, such as by determining an amount of power to be drawn by the first and second memories120and140and the processor110, while transferring the information from the first memory120to the second memory140. A larger amount of information to be saved may require a larger amount of power.

The computing device100may also determine other types of parameters, as explained below, related to power drawn by the computing device100before it is to enter the hibernate state. The power to be drawn, as determined by these various parameters, may be added together to determine a minimum actual remaining battery capacity for the first OS145to enter the hibernate state. Next, the computing device100may compare the minimum actual remaining battery capacity to the first battery level threshold of the first OS145. If the minimum actual remaining battery capacity is less than the first battery level threshold, the computing device100may set the first modified remaining battery capacity to be greater than the actual remaining battery capacity of the battery130and/or set the first updated threshold level to the minimum actual remaining battery capacity, which may be lower than the first battery level threshold, at block420, in order to delay a time before computing device100is to enter the hibernation state. For example, the minimum actual remaining battery capacity may be smaller with the less amount of information there is to be saved from the first memory120to the second memory140.

The information stored at the first memory120is separate from and usually less than a physical amount of memory installed, such as the storage capacity of the first memory120. The first OS145and/or the second OS230may distinguish between several types of the information stored at the first memory120, such as hardware reserved, in use, modified, standby, and free types of the information. The hardware reserved type of information may be dynamically used by drivers of at least one of the first and second OSs145and230, to store a momentary context of components of the system200. The in use type of information may be a cache of read-only data that was fetched from another memory, such as the second memory140. The modified type of information may represent user data, such as data that has been modified by an application used by the user, but which has not been stored back to another memory, such as the second memory140. The standby type of information may represent speculatively fetched locations of another memory, such as the second memory140, that have been written to the first memory120to assist in the faster loading of applications. The free type of information may represent an unused or empty part of the first memory120.

The standby and free types of information of the OS to enter the hibernate state, such as the first or second OS145or230, may be discarded and not saved to the second memory140by the system200. At least some of the hardware reserved type of information may be also be discarded depending on whether one or both of the first OS145and the second OS230are to enter the hibernate state. The in use type of information may also represent redundant type of information to be saved to the second memory140and the modified type of information may also represent non-redundant type of information to be saved to the second memory140.

Further, the redundant type of information to be saved to the second memory140may also include any duplicate information between the first and second OSs145and230. For example, if the first and second OSs145and230are the same type of OS or instances thereof, at least some of the hardware reserved, in use, or even possibly the modified type of information may be duplicative between the first and second OSs145and230.

A second example parameter that may be monitored by the computing device100at block410includes priorities of the redundant and non-redundant types of the information to be saved. The priority may refer to an order the information is to be saved, with the information having a greater priority being saved before information having a lower priority. As noted above, the redundant type of information may include read-only data stored at the first memory120that was fetched from the second memory140. As such, there may be duplicate copies of the redundant type information stored at both the first and second memories120and140. The non-redundant information may be data that is only stored at the first memory120, such as data modified or generated by hardware, an application, a user, and the like.

Thus, in the event that the computing device100was unable to store all of the non-redundant information before entering the hibernate state, such as if the battery130drained beforehand, information would be lost. On the other hand, if the computing device100was unable to store all of the redundant information before entering the hibernate or shutdown state, information may not be lost. Therefore, at block420, the computing device100may further set the first modified remaining battery capacity to vary relative to the actual remaining battery capacity and/or set the first updated threshold level, based on an amount or percentage of the non-redundant type of the information having a greater priority than that of the redundant type of information. For example, the computing device100may set the first modified remaining battery capacity to be greater than the actual remaining battery capacity and/or set the first updated threshold level to be lower than the first battery level threshold, if all or a majority of the non-redundant type of the information is to be saved before the redundant type of information, assuming the minimum actual remaining battery capacity adds up to be less than the first battery level threshold, as explained above.

A third example parameter that may be monitored by the computing device100at block410includes determining at least one of an age, power capacity and number of refresh cycles of the battery130. As batteries age and/or their number of refresh cycles increase, their knee at the end of discharge may become more unpredictable. The knee at the end of discharge may refer to a response where the voltage level of the battery collapses quickly as the actual remaining battery capacity nears zero. The refresh cycle may refer to the charging and discharging of the battery. Different types of batteries may also have different power capacities. For example, a twelve cell battery may store more power than a six cell battery. Further, the power capacity of the battery may also decrease as the battery ages or the number of refresh cycles increase. As a result of the above, the computing device100may reserve a greater actual remaining battery capacity of the battery to increase a likelihood of a successful transition to the hibernate state.

Therefore, the computing device100may set the first modified remaining battery capacity to vary relative to the actual remaining battery capacity and/or set the first updated threshold level, based on at least one of the age, power capacity and number of refresh cycles of the battery130at block420. For example, the computing device100may set the first modified remaining battery capacity to be less than the actual remaining battery capacity and/or the first updated threshold level to be greater than the first battery level threshold, as at least one of the age of the battery increases, the power capacity of the battery decreases, and the number of refresh cycles of the battery increases, assuming the minimum actual remaining battery capacity is greater than the first battery level threshold, as explained above.

A fourth example parameter that may be monitored by the computing device100at block410includes determining at least one of a temperature, processing speed, and power utilization of a component of the computing device100. The power utilization is to vary based on at least one of a complexity of software running on the computing device100, such as the first OS145or an application thereof, and a usage pattern of the computing device100. For example, if the computing device100is being lightly used or being left unattended by the user, the utilization of the component may be lower than if the computing device was more actively used. The component of the computing device100may include for example, the processor110.

The temperature of one or more components of the computing device100may have a direct and/or indirect impact on the time and energy required of the computing device100to enter the hibernate state. For example, a higher temperature may cause the computing device100to directly consume more power during operation compared to a lower temperature. Further, the higher temperature may indirectly lead to a longer time to enter the hibernation state if the processing speed of the processor110is lowered or throttled to prevent overheating. The throttling of the processor110may not only lead to slower performance by the processor110but also greater power consumption due to the longer time to enter the hibernation state.

Therefore, at block420, the computing device100may set the first modified remaining battery capacity to vary relative to the actual remaining battery capacity and/or set the first updated threshold level based on at least one of the temperature, the processing speed and the power utilization of the component of the computing device100. For example, the computing device100may set the first modified remaining battery capacity to be less than the actual remaining battery capacity and/or set the first updated threshold level to be greater than the first battery level threshold, as at least one of the temperature increases, the processing speed decreases and the utilization increases, assuming the minimum actual remaining battery capacity is greater than the first battery level threshold, as explained above.

A fifth parameter that may be monitored by the computing device100at block410includes determining at least one of a time and a power consumption to power down a peripheral device (not shown) connected to the computing device100. The time to power down may include a time to save information of the peripheral device. The peripheral device may include a device attached to but not part of the computing device100, such as a storage device, printer, digital camera, and the like. For example, the peripheral device may be a flash drive storing modified user data that is to be saved to the second memory140before the first OS145is to enter the hibernate state.

Therefore, at block420, the computing device100may set the first modified remaining battery capacity to vary relative to the actual remaining battery capacity and/or the first update threshold value to be less than the first battery level threshold, based at least one of the time and power consumption to power down the peripheral device. For example, the computing device100may set the first modified remaining battery capacity to be less than the actual remaining battery capacity and/or the first update threshold value to be greater than first battery level threshold as at least one of the time and power consumption to power down of the peripheral device increases, assuming the minimum actual remaining battery capacity is greater than the first battery level threshold, as explained above.

In embodiments, the computing device may100monitor any combination of the one or more parameters listed above and/or other parameters related to power drawn to enter the hibernate state. For example, the power to be drawn by any of these parameters may be added together to determine the minimum actual remaining battery capacity to enter the hibernate state. If the minimum actual remaining battery capacity is less than first battery level threshold, the first modified remaining battery capacity may be set to be less than the actual remaining battery capacity of the battery in order to delay a time before the first OS145is to enter the hibernate state. Conversely, the first modified remaining battery capacity may be set to be greater than the actual remaining battery capacity of the battery if the minimum actual remaining battery capacity is greater than first battery level threshold, in order ensure the first OS145is able to complete a transition to the hibernate state.

FIGS. 5A and 5Bare an example flowchart of a method500for reporting at least one of first and second modified remaining battery capacities and first and second updated threshold levels to first and second OSs145and230. Although execution of the method500is described below with reference to the system200, other suitable components for execution of the method500can be utilized, such as the computing devices100and300. Additionally, the components for executing the method500may be spread among multiple devices (e.g., a processing device in communication with input and output devices). In certain scenarios, multiple devices acting in coordination can be considered a single device to perform the method500. The method500may be implemented in the form of executable instructions stored on a machine-readable storage medium, such as storage medium310, and/or in the form of electronic circuitry.

In the method500ofFIGS. 5A and 5B, as explained above, the system200may include a hypervisor220to execute a plurality of virtual machines, such as the first OS145and second OS230. In this scenario, at block510, the hypervisor220receives a first battery level threshold from the first OS145and a second battery level threshold from the second OS230, running on the system200powered by the battery130. At block520, the hypervisor220determines an actual remaining battery capacity of a battery130powering the system200. At block530, the hypervisor220monitors parameters of the first virtual machine including the first OS145and the second virtual machine including the second OS230. The parameter of the first OS145can be power to be drawn by the system200for the first OS145to enter a hibernate state. A parameter of the second OS230can be power to be drawn by the system200for the second OS145to enter the hibernate state. The parameters vary with operation of the system200.

The first OS145and second OS230may not be aware of each other. Thus, the first and second battery level thresholds may not take into account that an entirety of the actual remaining battery capacity of the battery130may not be available to each of the first and second OSs145and230. Therefore, the system200may split the actual remaining battery capacity of the battery130between the first and second OSs145and230. In order to better determine how to split the actual remaining battery capacity, monitoring the parameter of the first OS and the parameter of the second OS at block530, may also include monitoring at least one of runtime percentage and user activity of the first OS145and second OS230.

The runtime percentage may refer to a percentage of the time that the OS is running or active. A user activity may refer to an amount or percentage of the user's activity that is directed to the OS. For example, the first OS145may be running or active more often, such as 80% of the time, while the second OS230may be running or active less often, such as 20% of the time. In this case, the system200may apportion a greater portion of the actual remaining battery capacity to the first OS145when setting the first modified remaining battery capacity at block540below. The blocks510,520and530may be carried out in a different order and/or simultaneously. Further, the blocks510and520may be omitted if the system200does not report the first or second modified remaining battery capacities.

The first and second modified remaining battery capacities ofFIGS. 5A and 5Bmay be set similarly to the first modified remaining battery capacity description related toFIG. 4. The first and second updated threshold levels ofFIGS. 5A and 5Bmay also be set similarly to the first updated threshold level description related toFIG. 4. For example, at block540, the system200extends a time before the first OS145is to enter the hibernate state by setting at least one of the first modified remaining battery capacity and the first updated threshold level. The first modified remaining battery capacity is based on the first battery level threshold, the actual remaining battery capacity and the parameter of the first OS145and the first updated threshold level is based on the parameter of the first OS145. At block550, the system200extends a time before the second OS230is to enter the hibernate state by setting at least one of the second modified remaining battery capacity and the second updated threshold level. The second modified remaining battery capacity is based on the second battery level threshold, the actual remaining battery capacity and the parameter of the second OS230and first updated threshold level is based on the parameter of the second OS230.

When determining the first and second modified remaining battery capacities at blocks540and550, the system200splits the determined actual remaining battery capacity into a first power portion and a second power portion based on the monitored runtime percentage and user activity at block530. The second modified remaining battery capacity is set based on the received second battery level threshold and one of the first and second power portions and sets the first modified remaining battery capacity based on another of the first and second power portions. For example, the system200may set the first modified remaining battery capacity to be greater than the second modified remaining battery capacity if the first OS145has at least one of a greater runtime percentage and user activity than that of the second OS230. As a result, the second modified remaining battery capacity may reach the second battery level threshold of the second OS230sooner the first modified remaining battery capacity reaches the first battery level threshold of the first OS145, allowing the first OS145to use a greater share of the actual remaining battery capacity. For instance, if the actual remaining battery capacity is 50%, the computing device100may report the first modified remaining battery capacity as 30% and the second modified remaining battery capacity as 20%.

On the other hand, the system200may set the second modified remaining battery capacity to be greater than the first modified remaining battery capacity if the second OS230has at least one of a greater runtime percentage and user activity than that of the first OS145. When determining the first and second updated threshold levels at blocks540and550, the system200may take into account the monitored runtime percentage and user activity at block430. For example, the computing device may set the first updated threshold level to be lower than the second updated threshold level if the first OS145has at least one of a greater runtime percentage and user activity than that of the second OS230. The system200may set the second updated threshold level to be lower than the first updated threshold level if the second OS230has at least one of a greater runtime percentage and user activity than that of the first OS145.

Then, at block560the system200reports at least one of the first modified remaining battery capacity and the first updated threshold level to the first OS145and reports at least one of the second modified remaining battery capacity and the second updated threshold level to the second OS230. Similar to the first OS145, the second OS230is to enter the hibernate state if the second modified remaining battery capacity is less than the second battery level threshold and is to enter a sleep state if the second OS230receives a sleep command and the second modified remaining battery capacity is greater than or equal to the second battery level threshold. The second OS230is to vary the second battery level threshold based on the second updated threshold level.

By apportioning the actual remaining battery capacity of the battery130between the first and second OSs145and230, the system200prevents or reduces the likelihood of the first and second OSs145and230from lacking sufficient power to transition to the hibernate state. Further, by providing different modified remaining battery capacities to the first and second OS145and230, the system200prevents or reduces the likelihood of the first and second OS145and230attempting to simultaneously write information from the first memory120to a same location of the second memory140.

At block570, the system200determines first and second warnings based on the monitoring at block530. The first and second warnings may further be determined based on the receiving and the determining at blocks510and520. Then, the system200sends the first warning value to the first OS145at block580and sends the second warning value to the second OS230at block590. The first warning value is to indicate the actual remaining battery capacity at which the first OS145is to warn the user that the battery130is low, and the second warning value is to indicate the actual remaining battery capacity at which the second OS230is to warn the user that the battery130is low. For example, if the first warning value is 10%, the first OS145may display a warning to the user that the actual remaining battery capacity of the battery130is low when the reported first modified remaining battery capacity or actual remaining battery capacity reaches 10%. The blocks570,580and590may be omitted if the warning value is not to be changed and/or carried out simultaneously with blocks540,550and560.

With the above approaches, a time before the computing device is to enter the hibernate state may be delayed and a time the computing device is in the active state may be extended. For example, a parameter related to an amount of memory to be saved, an age and condition of the computing device, a speed and temperature of components of the computing device, complexity of software running on the computing device, an age and capacity of a battery and the like may be monitored. The parameter may be then be used to determine an amount to vary a modified remaining battery capacity relative to the actual remaining battery capacity of the battery and/or determine a updated threshold level. The modified remaining battery capacity may be reported to the OS, with the OS to interpret the modified remaining battery capacity as the actual remaining battery capacity of the battery and to enter the hibernate state if the modified remaining battery capacity is less than the battery level threshold. The updated threshold level may be sent to the OS to change a value of the battery level threshold. Thus, sending the modified remaining battery capacity and/or the updated threshold level may delay an amount of time before the OS transitions to the hibernate state.