CPC G06F 1/3296 (2013.01) [G06F 9/4418 (2013.01)] | 17 Claims |
1. A device suspension method, comprising:
when a system of a device is in an idle state, terminating a background process that is unrelated to a foreground process and that runs in the system, and releasing memory space occupied by the background process;
storing running information of the system in a memory of the device, wherein the running information of the system does not comprise information about the background process; and
controlling the device to enter a suspended state,
wherein the memory of the device comprises a plurality of memory units, and the controlling the device to enter a suspended state comprises powering off components in the device other than at least a part of the memory units in the memory of the device, and
wherein before the controlling the device to enter a suspended state, the method further comprises:
compressing data in a first part of memory units in the memory and then migrating compressed data to a second part of memory units in the memory, wherein occupied storage space in the first part of memory units is less than a threshold, and the second part of memory units comprises a memory unit that stores data of an operating system and a memory unit whose occupied storage space is greater than or equal to the threshold; and
the controlling the device to enter a suspended state comprises:
powering off components in the device other than the second part of memory units.
|