devices, systems and methods are disclosed for limiting a number of hibernations based on a finite lifetime expectancy of nonvolatile memory. As the nonvolatile memory has a finite lifetime expectancy, a device may determine cumulative thresholds and associated session thresholds and may limit a frequency that the device hibernates. For example, the device may determine a cumulative number of hibernations and associate the cumulative number of hibernations with a cumulative threshold. The device may determine a session threshold corresponding to the cumulative threshold and may limit a number of hibernations using the session threshold. For example, the device may enter a hibernation state up to the session threshold and thereafter may enter a suspended state instead.
|
5. A computer-implemented method, comprising:
operating a device in a first power consumption state;
receiving, at a first time, a first command that indicates the device is to enter a second power consumption state in which the device consumes power at a lower rate than the first power consumption state;
determining a first value corresponding to a number of times that the device entered the second power consumption state between a second time and the first time, the second time before the first time;
determining that the first value is above a first threshold value;
determining a second value corresponding to a number of times that the device entered the second power consumption state between a third time and the first time, the third time before the first time and after the second time;
determining that the second value is below a second threshold value; and
based at least in part on determining that the first value is above the first threshold value and that the second value is below the second threshold value, placing the device in the second power consumption state.
13. A device, comprising:
at least one processor; and
at least one computer-readable medium encoded with instructions that, when executed by the at least one processor, cause the device to:
operate the device in a first power consumption state;
receive, at a first time, a first command that indicates the device is to enter a second power consumption state in which the device consumes power at a lower rate than the first power consumption state;
determine a first value corresponding to a number of times that the device entered the second power consumption state between a second time and the first time, the second time before the first time;
determine that the first value is above a first threshold value;
determine a second value corresponding to a number of times that the device entered the second power consumption state between a third time and the first time, the third time before the first time and after the second time;
determine that the second value is below a second threshold value; and
based at least in part on determining that the first value is above the first threshold value and that the second value is below the second threshold value, enter the second power consumption state.
1. A computer-implemented method of placing a device in a hibernation state, the method comprising:
receiving, at a first time, a first command that indicates the device is to enter the hibernation state, the hibernation state corresponding to a first power consumption rate;
determining a first value corresponding to a number of times that the device entered the hibernation state during a first period of time between a second time and the first time, the second time before the first time;
determining that the first value is above a first threshold value that corresponds to the first period of time;
determining a second value corresponding to a number of times that the device entered the hibernation state during a second period of time between a third time and the first time, the third time before the first time and after the second time;
determining that the second value is below a second threshold value that corresponds to the second period of time;
determining first data associated with applications executing on the device; and
based at least in part on determining that the first value is above the first threshold value and that the second value is below the second threshold value:
storing the first data to solid-state storage, and
placing the device in the hibernation state.
2. The computer-implemented method of
determining a lifetime expectancy associated with the solid-state storage, the lifetime expectancy corresponding to an estimate of how many times the device enters the hibernation state before the solid-state storage fails;
determining the first threshold value using a first percentage of the lifetime expectancy;
determining a first maximum number of times that the device is configured to enter the hibernation state within the second period of time, the first maximum corresponding to the first threshold value;
determining a third threshold value using a second percentage of the lifetime expectancy, the third threshold value greater than the first threshold value; and
determining a second maximum number of times that the device is configured to enter the hibernation state within the second period of time, the second maximum lower than the first maximum and corresponding to the third threshold value.
3. The computer-implemented method of
determining that the first value is below a third threshold value that is greater than the first threshold value;
determining a first maximum number of times that the device is configured to enter the hibernation state within the second period of time, the first maximum corresponding to the first threshold value; and
selecting the first maximum as the second threshold value.
4. The computer-implemented method of
receiving a second command that indicates the device is to enter the hibernation state;
determining that the device is receiving power from an external power supply; and
based at least in part on determining that the device is receiving power from the external power supply, placing the device in a suspended state corresponding to a second power consumption rate at which the device consumes power at a higher rate than the first power consumption rate.
6. The computer-implemented method of
determining a lifetime expectancy associated with nonvolatile memory of the device, the lifetime expectancy corresponding to an estimate of how many times the device enters the second power consumption state before the nonvolatile memory fails;
determining the first threshold value using a first percentage of the lifetime expectancy;
determining a first maximum number of times that the device is configured to enter the second power consumption state within a period of time, the first maximum corresponding to the first threshold value;
determining a third threshold value using a second percentage of the lifetime expectancy, the third threshold value greater than the first threshold value; and
determining a second maximum number of times that the device is configured to enter the second power consumption state within the period of time, the second maximum lower than the first maximum and corresponding to the third threshold value.
7. The computer-implemented method of
determining that the first value is below the third threshold value; and
selecting the first maximum as the second threshold value.
8. The computer-implemented method of
receiving, at a fourth time after the first time, a second command that indicates the device is to enter the second power consumption state;
determining a third value corresponding to a number of times that the device entered the second power consumption state between the second time and the fourth time;
determining that the third value is above the first threshold value;
determining a fourth value corresponding to a number of times that the device entered the second power consumption state between the third time and the fourth time;
determining that the fourth value is above the second threshold value; and
based at least in part on determining that the third value is above the first threshold value and that the fourth value is above the second threshold value, placing the device in a third power consumption state that is higher than the second power consumption state.
9. The computer-implemented method of
receiving, at a fourth time, a second command that indicates the device is to enter the second power consumption state;
determining a third value corresponding to a number of times that the device entered the second power consumption state between the second time and the fourth time, the third value less than the first value;
determining that the third value is below the first threshold value; and
based at least in part on determining that the third value is below the first threshold value, placing the device in the second power consumption state.
10. The computer-implemented method of
receiving, at a fourth time after the first time, a second command indicating causes the device is to enter the second power consumption state;
determining a third value corresponding to a number of times that the device entered the second power consumption state between the second time and the fourth time;
determining that the third value is above a third threshold value that is larger than the first threshold value;
and
based at least in part on determining that the third value is above the third threshold value, placing the device in a third power consumption state that is higher than the second power consumption state.
11. The computer-implemented method of
receiving a second command that indicates the device is to enter the second power consumption state;
determining that the device is receiving power from an external power supply; and
based at least in part on determining that the device is receiving power from the external power supply, placing the device in a third power consumption state that is higher than the second power consumption rate.
12. The computer-implemented method of
disabling power to a first peripheral on the device;
disabling power to volatile memory on the device; and
disabling power to a central processing unit on the device.
14. The device of
determine a lifetime expectancy associated with the nonvolatile memory, the lifetime expectancy corresponding to an estimate of how many times the device enters the second power consumption state before the nonvolatile memory fails;
determine the first threshold value using a first percentage of the lifetime expectancy;
determine a first maximum number of times that the device is configured to enter the second power consumption state within a period of time, the first maximum corresponding to the first threshold value;
determine a third threshold value using a second percentage of the lifetime expectancy, the third threshold value greater than the first threshold value; and
determine a second maximum number of times that the device is configured to enter the second power consumption state within the period of time, the second maximum lower than the first maximum and corresponding to the third threshold value.
15. The device of
determine that the first value is below the third threshold value; and
select the first maximum as the second threshold value.
16. The device of
receive, at a fourth time after the first time, a second command that indicates the device is to enter the second power consumption state;
determine a third value corresponding to a number of times that the device entered the second power consumption state between the second time and the fourth time;
determine that the third value is above the first threshold value;
determine a fourth value corresponding to a number of times that the device entered the second power consumption state between the third time and the fourth time;
determine that the fourth value is above the second threshold value; and
based at least in part on determining that the third value is above the first threshold value and that the fourth value is above the second threshold value, enter a third power consumption state that is higher than the second power consumption state.
17. The device of
receive, at a fourth time, a second command that indicates the device is to enter the second power consumption state;
determine a third value corresponding to a number of times that the device entered the second power consumption state between the second time and the fourth time, the third value less than the first value;
determine that the third value is below the first threshold value; and
based at least in part on determining that the third value is below the first threshold value, enter the second power consumption state.
18. The device of
receive, at a fourth time after the first time, a second command that indicates the device is to enter the second power consumption state;
determine a third value corresponding to a number of times that the device entered the second power consumption state between the second time and the fourth time;
determine that the third value is above a third threshold value that is larger than the first threshold value;
and
based at least in part on determining that the third value is above the third threshold value, enter a third power consumption state that is higher than the second power consumption state.
19. The device of
receive a second command that indicates the device is to enter the second power consumption state;
determine that the device is receiving power from an external power supply; and
based at least in part on determining that the device is receiving power from the external power supply, enter a third power consumption state that is higher than the second power consumption rate.
20. The device of
a first peripheral on the device;
volatile memory on the device; and
a central processing unit on the device.
21. The device of
determine data associated with one or more applications executing on the device, and
based at least in part on determining that the first value is above the first threshold value and that the second value is below the second threshold value, store the data to the nonvolatile memory.
23. The computer-implemented method of
determining data associated with one or more applications executing on the device; and
based at least in part on determining that the first value is above the first threshold value and that the second value is below the second threshold value, storing the data to nonvolatile memory of the device.
24. The computer-implemented method of
|
With the advancement of technology, the use and popularity of electronic devices has increased considerably. For mobile electronic devices, battery power may be conserved using a low power hibernation mode.
For a more complete understanding of the present disclosure, reference is now made to the following description taken in conjunction with the accompanying drawings.
Electronic devices, such as electronic readers, commonly include a battery. To reduce power consumption and therefore increase a length of battery life, a device may enter a low power consumption state when the device idle. A first example of a low power consumption state is a suspended state, which reduces the power consumption a small amount but may resume normal operation relatively quickly as power is maintained to volatile memory (e.g., random-access memory (RAM) such as double data rate synchronous dynamic random-access memory (DDR SDRAM)) and therefore data stored in the volatile memory is refreshed. A second example of a low power consumption state is a hibernation state, which reduces the power consumption a large amount but may resume normal operation relatively slowly as power is not maintained to the volatile memory and therefore data stored in the volatile memory (e.g., snapshot data) must be loaded from nonvolatile memory (e.g., hard drive, solid state drive or the like such as an embedded multimedia card (eMMC)).
The time from receiving a restore command to system interactivity (e.g., device responding to user input) may be reduced by preloading a portion of the snapshot data from the nonvolatile memory to the volatile memory, resuming system interactivity and then loading the remaining snapshot data during idle periods. However, while the time to system interactivity is reduced, a user may perceive lag when snapshot data isn't loaded in the volatile memory and must be loaded from the nonvolatile memory. In addition, a sequential read/write speed associated with the preloading of the nonvolatile memory may be much faster than a random access read/write speed associated with loading the data on-demand.
To reduce power consumption while reducing a latency perceived by a user, devices, systems and methods are disclosed for determining data to include in snapshot data and preloading a portion of the snapshot data upon resuming from a hibernation state. By preloading snapshot data that is likely to be requested by the user, the device may reduce the perceived latency as the requested data is already loaded in the volatile memory.
To reduce power consumption and therefore increase a battery life of the device 102, the device 102 may disable components and enter a low power consumption state. When the device 102 disables a component or disables power to the component, the device 102 is turning off, powering off or otherwise disabling the component so that the component does not consume power. While the component is disabled, the component is unable to perform normal operation and certain features of the device 102 are therefore unavailable. Thus, the device 102 may disable components to reduce the power consumption during periods of inactivity. Examples of a low power consumption state include a suspended state and/or a hibernation state. The suspended state has lower power consumption than normal system operation but maintains power to certain components and maintains data stored in volatile memory, allowing the device 102 to resume normal system operation (e.g., system interactivity) after a short period of time. In contrast, the hibernation state has even lower power consumption than the suspended state but resuming normal system operation (e.g., system interactivity) requires a slightly longer period of time. For example, the hibernation state reduces power consumption by copying a snapshot of data stored in the volatile memory into nonvolatile memory and disabling additional components, such as the volatile memory. In order to resume normal system operation, the device 102 must copy the snapshot from the nonvolatile memory back to the volatile memory prior to system interactivity (e.g., responsiveness to input from a user) corresponding to an active state. A period of time between exiting the hibernation state and entering the active state may be referred to as an “unresponsive state.” In the unresponsive state, the device 102 may display content on the display 104 and otherwise appear interactive, but the snapshot is being copied to the volatile memory and the device 102 is unresponsive to user input.
As illustrated in
The device 102 may receive (132) a command to exit the hibernation state and resume normal system operation. For example, the command may be a wake-up event, a physical press of a power button or the like that triggers the device 102 to exit the hibernation state. To resume system operation, the device 102 may load (134) the preload data during preloading, may activate (136) user space processes and may resume (138) system operation. After resuming the system operation, the device 102 may be responsive to user input.
After resuming system operation, the device 102 may load (140) data from the snapshot during on-demand loading. For example, the user may input a command associated with a first process and the device 102 may load data associated with the first process from the snapshot. The device 102 may load (142) remaining data from the snapshot when the system is idle. For example, the device 102 may determine that the device 102 is idle and may load the remaining data until the system is no longer idle.
To improve battery life of the device 102 and reduce overall power consumption, the device 102 may enter the hibernation state when the device is idle. However, each time the device 102 enters the hibernation state the device 102 may store data from volatile memory to a snapshot in nonvolatile memory, such as solid state storage like embedded multimedia card (eMMC), that has a finite lifetime expectancy. For example, the nonvolatile memory may write to an individual sector a fixed number of times (e.g., 2,000 times) before receiving read/write errors associated with the sector, although each individual sector is different. To prolong a useful life of the nonvolatile memory, the nonvolatile memory may include a controller that performs wear leveling to evenly distribute read/write commands throughout the sectors. However, after entering the hibernation state a number of times, an amount of sectors receiving read/write errors rises above a threshold and the nonvolatile memory reaches its finite lifetime expectancy.
In order to prolong the useful life of the nonvolatile memory, and therefore reduce power consumption of the device 102 by enabling the device 102 to enter the hibernation state over a longer period of time, the device 102 may limit a frequency that the device 102 enters the hibernation state. For example, after a first number of “cumulative hibernations” (e.g., the device 102 enters the hibernation state a first number of times over a total lifetime of the device 102), the device 102 may limit the device to a fixed number of “session hibernations” (e.g., the device 102 enters the hibernation state a maximum of the fixed number of times over a period of time).
As illustrated in
The device 102 may compare the total number of hibernations to any number of cumulative thresholds. In some examples, the device 102 may include a cumulative counter that increments each time the device 102 enters the hibernation state, such that an output of the cumulative counter corresponds to the cumulative number of hibernations. Similarly, the device 102 may include a session counter that increments each time the device 102 enters the hibernation state and resets to zero at the end of the session, such that an output of the session counter corresponds to the number of hibernations per session.
The session threshold may correspond to fixed intervals of time (e.g., hourly, daily, weekly, etc.) and/or to variable intervals of time (e.g., each time the device 102 is on battery power, resetting when the device 102 is being charged or each time the device 102 is powered on, resetting when the device 102 is powered off). Thus, a number of times that the device 102 enters the hibernation state may vary over time and the device 102 may determine an interval associated with the session based on usage of the device 102. For example, if the device 102 is charged once a week or less, the device 102 may associate the session threshold with a weekly interval, thus limiting the device 102 to hibernating a maximum number of times per week to reduce power consumption and prolong the battery life. In contrast, if the device 102 is charged twice a week or more, the device 102 may base the session threshold on the frequency of charging, thus limiting the device 102 to hibernating a maximum number of times each time that the device 102 runs on battery power. This may avoid a situation where a battery of the device 102 lasts a first duration early in the week (when the device 102 enters the hibernation state) and a second duration later in the week (when the device 102 has exceeded the session threshold and enters the suspended state instead, consuming more power).
To illustrate an example, the device 102 may determine a first cumulative threshold (e.g., 50% of lifetime expectancy) associated with a first session threshold (e.g., entering the hibernation state a maximum of 10 times per day) and a second cumulative threshold (e.g., 75% of lifetime expectancy) associated with a second session threshold (e.g., entering the hibernation state a maximum of 5 times per day). Thus, the device 102 may enter the hibernation state an unlimited amount of times per day until the total number of hibernations is above the first cumulative threshold (e.g., total number of hibernations >50% of lifetime expectancy), at which point the device 102 may enter the hibernation state up to the first session threshold (e.g., a maximum of 10 hibernations per day). Once the device 102 reaches the first session threshold (e.g., 10 hibernations in one day), the device 102 may enter a suspended state instead of the hibernation state until an expiration of the session (e.g., until the next day). After the total number of hibernations is above the second cumulative threshold (e.g., total number of hibernations >75% of lifetime expectancy), the device 102 may enter the hibernation state up to the second session threshold (e.g., a maximum of 5 hibernations per day). Once the device 102 reaches the second session threshold (e.g., 5 hibernations in one day), the device 102 may enter the suspended state instead of the hibernation state until an expiration of the session (e.g., until the next day).
As discussed above, the device 102 may reduce power consumption by disabling components and entering a suspended state and/or a hibernation state. The suspended state has lower power consumption than normal system operation but maintains power to certain components and maintains data stored in volatile memory, allowing the device 102 to resume normal system operation (e.g., system interactivity) after a short period of time. In contrast, the hibernation state has even lower power consumption than the suspended state but resuming normal system operation (e.g., system interactivity) requires a slightly longer period of time. For example, the hibernation state reduces power consumption by copying a snapshot of data stored in the volatile memory into nonvolatile memory and disabling additional components, such as the volatile memory. In order to resume normal system operation, the device 102 must copy the snapshot from the nonvolatile memory back to the volatile memory prior to system interactivity (e.g., responsiveness to input from a user).
The PMIC 202 may be configured to manage power requirements of the device 102 and may be used to place the device in the suspended state 200. For example, when the PMIC 202 is in suspend mode, the device 102 may stop the CPU 212 (e.g., place the CPU 212 into a low power consumption mode), gate the clocks 215, place the volatile memory 222 in a low power consumption mode and disable power to the L2 cache 213, nonvolatile memory 224, WLAN adapter 226 and/or WWAN adapter 228. However, the PMIC 202 may maintain power to the on-chip memory 211 and the peripherals 214. Thus, the PMIC 202 may maintain power to multiple rails without providing a lot of current, reducing power consumption of the device 102.
In the low power consumption mode, the volatile memory 222 is inaccessible to the device 102, such that the device 102 cannot access data stored in the volatile memory 222, but the volatile memory 222 self-refreshes the data using an internal timer so that the data stored in the volatile memory 222 is maintained. When the clocks 215 are gated, a majority of the clocks are maintained at a fixed level without high frequency oscillations, resulting in a low power consumption. As the clocks 215 are gated, the peripherals 214 are not operating but register settings are preserved because the PMIC 202 maintains power to the peripherals 214. When the WLAN adapter 226 and the WAN adapter 228 are disabled, the device 102 is not connected to an access point, cellular network tower or any other network. While the nonvolatile memory 224 is disabled, data stored in the nonvolatile memory 224 is maintained until the device 102 resumes system interactivity following a restore command (or other event trigger associated with a wake-up event). Upon receiving the restore command, the device 102 may be unresponsive to a user until the components are enabled and functioning.
As discussed above, the suspended state may reduce power consumption to a first value (e.g., 650 mA) and may resume system interactivity after a first period of time (e.g., 2 seconds). In contrast, a hibernation state may reduce power consumption to a second value smaller than the first value (e.g., 100 mA) and resume system interactivity after a second period of time longer than the first period of time (e.g., 6 seconds).
As illustrated in
When the nonvolatile memory 224 is disabled, data stored in the nonvolatile memory 224 is maintained. However, when the volatile memory 222 is disabled, data stored in the volatile memory 222 is not maintained. Similarly, data stored in the on-chip memory 211, register settings stored in the peripherals 214 and/or other data is not maintained during the hibernation state 300. Therefore, the device 102 must copy data from the volatile memory 222, the on-chip memory 211, the peripherals 214 and/or other components to the nonvolatile memory 224 prior to entering the hibernation state. Thus, the nonvolatile memory 224 may store a snapshot or snapshot data that enables the device 102 to restore data to the volatile memory 222, data to the on-chip memory 211, register settings to the peripherals 214 and/or other data or settings prior to resuming system interactivity. Upon receiving a restore command (or other event trigger associated with a wake-up event), the device 102 may be unresponsive to a user until the components are enabled and the snapshot data is loaded into the on-chip memory 211, peripherals 214, volatile memory 222 and/or other components.
To generate the snapshot 320, the device 102 may store data stored in the user space processes 314 portion of the memory to the second portion 324 in the snapshot 320. The device 102 may then generate an atomic copy of data stored in the kernel memory 312 by freezing contents of volatile memory, freezing a user state and/or freezing state(s) of the input/output system corresponding to each process running on the device 102. As used herein, freezing contents refers to capturing the contents at a fixed time, such as when the hibernation command is received or after storing the second portion 324 to the snapshot 320. In some examples, the frozen data may be copied to generate an atomic copy that will not change. For example, data stored in the kernel memory 312 may be copied to the user space processes 314 and/or the free memory 316 portions of the memory managed by the OS kernel 310. If the data stored in the kernel memory 312 is not copied to the user space processes 314 and/or the free memory 316, the data may be changed or modified when generating the snapshot 320, such that the first portion 322 does not correspond to the data stored in the kernel memory 312 at the fixed time. For example, copying data stored in the kernel memory 312 without first saving an atomic copy may change values, counter values, which sector saved, etc. associated with a state of the device. To generate the atomic copy, once data stored in the user space processes 314 is stored as the second portion 324 of the snapshot 320, the device 102 may copy the data stored in the kernel memory 312 to the user space processes 314 and/or free memory 316 using program code that performs memory to memory copying without changing a state of the memory itself.
After generating the atomic copy, the device 102 may store the second portion 324 in the snapshot 320 and then may store the first portion 322 in the snapshot 320. The device 102 may generate the atomic copy and store the snapshot 320 in this particular order so that when the first portion 322 is restored to the kernel memory 312, the data stored in the kernel memory 312 may correspond to the data stored in the user space processes 314 at the fixed time.
In contrast to the first method, the device 102 may initialize select components and load the snapshot data directly to the volatile memory from the nonvolatile memory, reducing the latency from receiving the restore command to resuming system interactivity.
To further reduce the latency from receiving the restore command to resuming system interactivity, the device 102 may load a portion of the snapshot data prior to resuming system interactivity and may continue loading the snapshot data after resuming system interactivity.
As illustrated in
To load the remaining portions of the snapshot data, the device 102 may determine (520) whether the system is idle. If the device 102 determines that the system is idle, the device 102 may load (522) remaining data of the snapshot from the nonvolatile memory to the volatile memory (e.g., idle loading).
If the system is busy and therefore not idle, the device 102 may perform processes requested by a user and determine (524) if requested data is loaded in the volatile memory. If the requested data is loaded, the device 102 may loop (526) to step 520 and continue. However, if the requested data is not loaded from the snapshot, the device 102 may determine (528) the requested data in the snapshot, may load (530) the requested data from the nonvolatile memory to the volatile memory (e.g., on-demand loading) and may loop (532) to step 520. For example, if the user inputs a command associated with a process (e.g., application) that was running prior to the hibernation state, data associated with the process may be stored in the remaining portion of the snapshot that was not loaded to the volatile memory. In order to perform the command, the device 102 may load the requested data from the snapshot to the volatile memory (e.g., on-demand loading), which may result in a slight latency perceived by the user. For example, after receiving the command, the device 102 may not perform the command and display the requested data until the device 102 loads the requested data from the nonvolatile memory to the volatile memory.
When a process requests data from the snapshot that is not preloaded, the device 102 may perform an additional step of arbitration to identify the requested data in the snapshot and perform on-demand loading to load the requested data from the snapshot.
If the device 102 selects a small portion of the snapshot data as preload data (e.g., data loaded during preloading in step 514), the device 102 may resume system interactivity relatively fast and may load the remaining data during idle loading without any latency perceived by the user. However, during preloading, the device 102 may load a relatively high number of sectors at a time (e.g., 100 to 125 sectors) as read access is much faster than on-demand access due to limitations caused by a controller of the nonvolatile memory. In contrast, the device 102 may load a relatively small number of sectors at a time (e.g., 4 to 8 sectors) during on-demand loading. Thus, while the device 102 may resume system interactivity relatively fast, if the user requests data that isn't preloaded, the on-demand loading may load the data at a much slower transfer rate and result in additional latency perceived by the user.
To reduce the latency perceived by the user, the device 102 may predict processes and corresponding data that are likely to be requested by the user after resuming from the hibernation state and may add the corresponding data to the preload data. For example, the device 102 may identify processes running when the hibernation command is received and may associate data corresponding to the running processes with preload data to be loaded during preloading. As a result, the data corresponding to the running processes will be loaded prior to resuming system interactivity in step 518. Thus, while increasing an amount of preload data may result in a slight increase in time before the device 102 resumes system interactivity, the user is less likely to request data that isn't loaded in the volatile memory, reducing a latency caused by loading the requested data using on-demand loading.
In contrast,
For ease of use, hereinafter “memory pages” may be referred to as “pages.” Virtual memory may refer to a process of storing data in volatile memory and/or nonvolatile memory in order to increase an amount of memory available to an application/process beyond the volatile memory (e.g., physical Random Access Memory (RAM) or the like available on the device 102). An example of a page cache is a cache that associates pages (e.g., fixed-length contiguous block of virtual memory that stores data) stored in volatile memory and/or nonvolatile memory with individual applications/processes.
The page cache is a kernel level concept and may include an entire set of pages, such that anything accessed frequently by the kernel memory 312 is included in the page cache. In contrast, VMAs are a process level concept, such that each process has a corresponding list of VMAs mapping to a set of pages stored in the page cache. For example, a first process may be associated with a first list including twenty VMAs, whereas a second process may be associated with a second list including fifteen VMAs. The overall page cache may be relatively large, while the device 102 may select only a subset of the overall page cache as the preload data (e.g., a third, a quarter or the like). The number of pages from the page cache selected as the preload data varies over time based on a frequency of use. For example, if the kernel memory 310 frequently accesses a first number of pages in the page cache at a first time and a second number of pages in the page cache at a second time, first preload data associated with the first time may include the first number of pages and second preload data associated with the second time may include the second number of pages.
To generate the preload data, the device 102 may scan the list of VMAs for each individual process in order to find the list of pages available and may then determine if the available pages are stored in the page cache. The device 102 may select a first portion of the available pages (that are stored in the page cache) to include in the preload data and may ignore a second portion of the available pages (that are not stored in the page cache). Additionally or alternatively, the device 102 may use multiple techniques to select the first portion to include in the preload data using selection criteria. For example, the device 102 may select entire sets of pages associated with each user space process to include in the preload data, resulting in a large amount of preload data. To reduce the amount of preload data, the device 102 may instead use the selection criteria to select a subset of pages associated with each user space process. For example, the device 102 may select a specific address range associated with each user space process, may select file pages associated with each user space process, may select all active file pages associated with each user space process, may select all file anonymous pages or the like. However, the device 102 may select the subset of pages using techniques known to one of skill in the art without departing from the present disclosure.
Further, the device 102 may determine the list using multiple techniques. In a first example, the device 102 may determine the list to include all running processes at the time that the hibernation command is received. In a second example, the device 102 may determine the list to include running processes that have been accessed by the user within a period of time prior to the hibernation command being received (e.g., processes that the user opened within the last five minutes). In a third example, the device 102 may determine the list to include running processes using criteria that indicate that the user has used the process extensively, such as processes that have received a number of inputs above a threshold (e.g., user interacted with the process extensively), have been running for a period of time above a threshold (e.g., process has continued to run over a long time), have been displayed to the user for a period of time above a threshold (e.g., process has been displayed on the screen a long time) and/or are associated with a quantity of data above a threshold (e.g., process may access a lot of data in volatile memory). However, the disclosure is not limited thereto and the device 102 may determine the list using other techniques. For example, the device 102 may determine the list to include non-running processes that are frequently accessed by the user without departing from the disclosure.
Additionally or alternatively, the device may determine the list based on the weighting. Thus, the device 102 may determine a weighting associated with each of the running processes and may narrow the list based on the weighting. For example, the device 102 may associate a more recently accessed process with a higher weight than a less recently accessed process. Thus, a first process accessed 20 seconds prior to the hibernation command may be associated with a first weight while a second process accessed 2 minutes prior to the hibernation command may be associated with a second weight lower than the first weight. Additionally or alternatively, the device 102 may associate a first process that has been running for ten minutes with the first weight while a second process that has been running for two minutes may be associated with the second weight.
Based on the individual weights indicating a priority of the processes, the device 102 may select processes to include in the list of processes to be preloaded after hibernation. As a first example, the device 102 may select processes that have a weight above a threshold. Thus, if many processes are running on the device 102 and have weights above the threshold, the device 102 may select a large number of processes, whereas if few processes are running on the device 102 and have weights above the threshold, the device 102 may select a small number of processes. As a second example, the device 102 may select a fixed number of processes in order of individual weights. Thus, the device 102 may select the five processes associated with the five highest weights, regardless of the weight. In a third example, the device 102 may select a variable number of processes in order of weight so that the preloading is performed in a fixed period of time. For example, a first process may have a first weight and correspond to a first amount of data while a second process may have a second weight lower than the first weight and may correspond to a second amount of data. The device 102 may determine that, based on the first amount of data and the second amount of data, the preloading would take longer than the fixed amount of time and may select the first process but not the second process. The present disclosure is not limited thereto and the device 102 may select the processes using other techniques without departing from the disclosure.
As discussed above with regard to
In order to prolong the useful life of the nonvolatile memory, and therefore reduce power consumption of the device 102 by enabling the device 102 to enter the hibernation state over a longer period of time, the device 102 may limit a frequency that the device 102 enters the hibernation state. For example, after a first number of “cumulative hibernations” (e.g., the device 102 enters the hibernation state a first number of times over a total lifetime of the device 102), the device 102 may limit the device to a fixed number of “session hibernations” (e.g., the device 102 enters the hibernation state a maximum of the fixed number of times over a period of time).
The device 102 may determine a total number of hibernations (e.g., total number of times that the device 102 entered the hibernation state over the total lifetime of the device 102) and may compare the total number of hibernations to one or more cumulative thresholds. For each of the cumulative thresholds, the device 102 may determine a corresponding session threshold (e.g., maximum number of times that the device 102 may enter the hibernation state for each session or interval). For example, the device 102 may determine a first cumulative threshold (e.g., 50% of lifetime expectancy) associated with a first session threshold (e.g., entering the hibernation state a maximum of 10 times per day) and a second cumulative threshold (e.g., 75% of lifetime expectancy) associated with a second session threshold (e.g., entering the hibernation state a maximum of 5 times per day). Thus, the device 102 may enter the hibernation state an unlimited amount of times per day until the total number of hibernations is above the first cumulative threshold (e.g., total number of hibernations >50% of lifetime expectancy), at which point the device 102 may enter the hibernation state up to the first session threshold (e.g., a maximum of 10 hibernations per day). Once the device 102 reaches the first session threshold (e.g., 10 hibernations in one day), the device 102 may enter the suspended state instead of the hibernation state until an expiration of the session (e.g., until the next day). After the total number of hibernations is above the second cumulative threshold (e.g., total number of hibernations >75% of lifetime expectancy), the device 102 may enter the hibernation state up to the second session threshold (e.g., a maximum of 5 hibernations per day). Once the device 102 reaches the second session threshold (e.g., 5 hibernations in one day), the device 102 may enter the suspended state instead of the hibernation state until an expiration of the session (e.g., until the next day).
The device 102 may compare the total number of hibernations to any number of cumulative thresholds. In some examples, the device 102 may include a cumulative counter that increments each time the device 102 enters the hibernation state, such that an output of the cumulative counter corresponds to the total number of hibernations. Similarly, the device 102 may include a session counter that increments each time the device 102 enters the hibernation state and resets to zero at the end of the session, such that an output of the session counter corresponds to the number of hibernations per session.
The session threshold may correspond to fixed intervals of time (e.g., hourly, daily, weekly, etc.) and/or to variable intervals of time (e.g., each time the device 102 is on battery power, resetting when the device 102 is being charged or each time the device 102 is powered on, resetting when the device 102 is powered off). Thus, a number of times that the device 102 enters the hibernation state may vary over time and the device 102 may determine an interval associated with the session based on usage of the device 102. For example, if the device 102 is charged once a week or less, the device 102 may associate the session threshold with a weekly interval, thus limiting the device 102 to hibernating a maximum number of times per week to reduce power consumption and prolong the battery life. In contrast, if the device 102 is charged twice a week or more, the device 102 may base the session threshold on the frequency of charging, thus limiting the device 102 to hibernating a maximum number of times each time that the device 102 runs on battery power. This may avoid a situation where a battery of the device 102 lasts a first duration early in the week (when the device 102 enters the hibernation state) and a second duration later in the week (when the device 102 has exceeded the session threshold and enters the suspended state instead, consuming more power).
As illustrated in
As illustrated in
In some examples, the device 102 may set a maximum number of hibernations per session to a value of one to maximize the period of time that the device 102 may hibernate at least once per session. As illustrated in
Optionally, the device 102 may determine (1122) a first battery threshold corresponding to the first cumulative threshold. The battery threshold may be a high threshold (e.g., 75% battery life) where the device 102 may not enter the hibernation state as battery conservation is not an issue, or the battery threshold may be a low threshold (e.g., 15-20% battery life) where the device 102 may not enter the hibernation state as there isn't enough battery life to perform hibernation. As a first example of the high threshold, if the device 102 determines that a charge of the battery is above the first battery threshold, the device 102 may determine not to hibernate and may enter a suspension state instead, as battery life is not yet an issue. Thus, the device 102 may enter a hibernation state when the charge of the battery falls below the first battery threshold and may instead enter a suspended state when the charge of the battery is above the first battery threshold. As a second example of the low threshold, the device 102 may determine that the charge of the battery is below the first battery threshold and may determine not to hibernate, as the device 102 may exhaust the remaining battery life while entering the hibernation state. For example, entering the hibernation state may consume a variable amount of battery life (e.g., roughly 10%) and if the battery is exhausted prior to entering the hibernation state, data may be lost or not accurately stored. In addition, the device 102 may be unresponsive to the user and unable to indicate that there is low battery during the hibernation state. Thus, the device 102 may enter the hibernation state when the charge of the battery is above the first battery threshold and may enter the suspended state when the charge of the battery is below the first battery threshold.
The device 102 may determine (1124) whether to generate additional cumulative thresholds. If the device 102 determines to generate additional cumulative threshold(s), the device 102 may loop (1126) to step 1118 and perform steps 1118-1122 for each of the additional cumulative threshold(s). If the device 102 determines not to generate additional cumulative threshold(s), the process may end.
As illustrated in
The device 102 may include one or more controllers/processors 1304 comprising one-or-more central processing units (CPUs) for processing data and computer-readable instructions and a memory 1306 for storing data and instructions. The memory 1306 may include volatile random access memory (RAM), non-volatile read only memory (ROM), non-volatile magnetoresistive (MRAM) and/or other types of memory. The device 102 may also include a data storage component 1308 for storing data and processor-executable instructions. The data storage component 1308 may include one or more non-volatile storage types such as magnetic storage, optical storage, solid-state storage, etc. The device 102 may also be connected to a removable or external non-volatile memory and/or storage (such as a removable memory card, memory key drive, networked storage, etc.) through the input/output device interfaces 1310.
The device 102 includes input/output device interfaces 1310. A variety of components may be connected to the device 102 through the input/output device interfaces 1310. The input/output device interfaces 1310 may be configured to operate with a network 1320, for example a wireless local area network (WLAN) (such as WiFi), Bluetooth, ZigBee and/or wireless networks, such as a Long Term Evolution (LTE) network, WiMAX network, 3G network, etc. The network 1320 may include a local or private network or may include a wide network such as the internet. Devices may be connected to the network 1320 through either wired or wireless connections.
The input/output device interfaces 1310 may also include an interface for an external peripheral device connection such as universal serial bus (USB), FireWire, Thunderbolt, Ethernet port or other connection protocol that may connect to networks 1320. The input/output device interfaces 1310 may also include a connection to an antenna (not shown) to connect one or more networks 1320 via a wireless local area network (WLAN) (such as WiFi) radio, Bluetooth, and/or wireless network radio, such as a radio capable of communication with a wireless communication network such as a Long Term Evolution (LTE) network, WiMAX network, 3G network, etc.
The device 102 further includes a hibernation module 1324, which may comprise processor-executable instructions stored in storage 1308 to be executed by controller(s)/processor(s) 1304 (e.g., software, firmware), hardware, or some combination thereof. For example, components of the hibernation module 1324 may be part of a software application running in the foreground and/or background on the device 102. The hibernation module 1324 may control the device 102 as discussed above, for example with regard to
Executable computer instructions for operating the device 102 and its various components may be executed by the controller(s)/processor(s) 1304, using the memory 1306 as temporary “working” storage at runtime. The executable instructions may be stored in a non-transitory manner in non-volatile memory 1306, storage 1308, or an external device. Alternatively, some or all of the executable instructions may be embedded in hardware or firmware in addition to or instead of software.
The components of the device 102, as illustrated in
The concepts disclosed herein may be applied within a number of different devices and computer systems, including, for example, general-purpose computing systems, server-client computing systems, mainframe computing systems, telephone computing systems, laptop computers, cellular phones, personal digital assistants (PDAs), tablet computers, video capturing devices, video game consoles, speech processing systems, distributed computing environments, etc. Thus the modules, components and/or processes described above may be combined or rearranged without departing from the scope of the present disclosure. The functionality of any module described above may be allocated among multiple modules, or combined with a different module. As discussed above, any or all of the modules may be embodied in one or more general-purpose microprocessors, or in one or more special-purpose digital signal processors or other dedicated microprocessing hardware. One or more modules may also be embodied in software implemented by a processing unit. Further, one or more of the modules may be omitted from the processes entirely.
The above embodiments of the present disclosure are meant to be illustrative. They were chosen to explain the principles and application of the disclosure and are not intended to be exhaustive or to limit the disclosure. Many modifications and variations of the disclosed embodiments may be apparent to those of skill in the art. Persons having ordinary skill in the field of computers and/or digital imaging should recognize that components and process steps described herein may be interchangeable with other components or steps, or combinations of components or steps, and still achieve the benefits and advantages of the present disclosure. Moreover, it should be apparent to one skilled in the art, that the disclosure may be practiced without some or all of the specific details and steps disclosed herein.
Embodiments of the disclosed system may be implemented as a computer method or as an article of manufacture such as a memory device or non-transitory computer readable storage medium. The computer readable storage medium may be readable by a computer and may comprise instructions for causing a computer or other device to perform processes described in the present disclosure. The computer readable storage medium may be implemented by a volatile computer memory, non-volatile computer memory, hard drive, solid-state memory, flash drive, removable disk and/or other media.
Embodiments of the present disclosure may be performed in different forms of software, firmware and/or hardware. Further, the teachings of the disclosure may be performed by an application specific integrated circuit (ASIC), field programmable gate array (FPGA), or other component, for example.
Conditional language used herein, such as, among others, “can,” “could,” “might,” “may,” “e.g.,” and the like, unless specifically stated otherwise, or otherwise understood within the context as used, is generally intended to convey that certain embodiments include, while other embodiments do not include, certain features, elements and/or steps. Thus, such conditional language is not generally intended to imply that features, elements and/or steps are in any way required for one or more embodiments or that one or more embodiments necessarily include logic for deciding, with or without author input or prompting, whether these features, elements and/or steps are included or are to be performed in any particular embodiment. The terms “comprising,” “including,” “having,” and the like are synonymous and are used inclusively, in an open-ended fashion, and do not exclude additional elements, features, acts, operations, and so forth. Also, the term “or” is used in its inclusive sense (and not in its exclusive sense) so that when used, for example, to connect a list of elements, the term “or” means one, some, or all of the elements in the list.
Conjunctive language such as the phrase “at least one of X, Y and Z,” unless specifically stated otherwise, is to be understood with the context as used in general to convey that an item, term, etc. may be either X, Y, or Z, or a combination thereof. Thus, such conjunctive language is not generally intended to imply that certain embodiments require at least one of X, at least one of Y and at least one of Z to each is present.
As used in this disclosure, the term “a” or “one” may include one or more items unless specifically stated otherwise. Further, the phrase “based on” is intended to mean “based at least in part on” unless specifically stated otherwise.
Patent | Priority | Assignee | Title |
11455430, | Oct 16 2017 | HUAWEI TECHNOLOGIES CO , LTD | Secure element and related device |
11550496, | Feb 28 2020 | Samsung Electronics Co., Ltd. | Buffer management during power state transitions using self-refresh and dump modes |
11652898, | Jul 14 2016 | HERCULES CAPITAL, INC | Graphical user interface and system for viewing landing page content |
11665248, | Jul 14 2016 | HERCULES CAPITAL, INC | Graphical user interface and system for viewing landing page content |
11908002, | Jun 04 2009 | Black Crow AI, Inc. | Method and system for electronic advertising |
Patent | Priority | Assignee | Title |
20120131368, | |||
20130227325, | |||
20150198998, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Mar 25 2016 | Amazon Technologies, Inc. | (assignment on the face of the patent) | / | |||
Jun 25 2016 | MITRA, SOMNATH | Amazon Technologies, Inc | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 039191 | /0787 |
Date | Maintenance Fee Events |
Jul 08 2022 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Date | Maintenance Schedule |
Jan 08 2022 | 4 years fee payment window open |
Jul 08 2022 | 6 months grace period start (w surcharge) |
Jan 08 2023 | patent expiry (for year 4) |
Jan 08 2025 | 2 years to revive unintentionally abandoned end. (for year 4) |
Jan 08 2026 | 8 years fee payment window open |
Jul 08 2026 | 6 months grace period start (w surcharge) |
Jan 08 2027 | patent expiry (for year 8) |
Jan 08 2029 | 2 years to revive unintentionally abandoned end. (for year 8) |
Jan 08 2030 | 12 years fee payment window open |
Jul 08 2030 | 6 months grace period start (w surcharge) |
Jan 08 2031 | patent expiry (for year 12) |
Jan 08 2033 | 2 years to revive unintentionally abandoned end. (for year 12) |