Apple patent involves hibernation mode for computers
Posted by Dennis Sellers
Jun 25, 2009 at 7:01am
Apple apparently wants Macs to sleep more soundly—and for hibernating Macs to wake up faster. Patent number 20090164771 at the US Patent &Trademark Office is for a method and apparatus for quickly reanimating devices from hibernation.
The invention relates generally to techniques for saving power in computing devices. More specifically, the present invention relates to a method and an apparatus for quickly recovering from a hibernation mode, wherein the active state of a computing device is preserved while power to the computing device is turned off.
The patent is for a system system that causes a computing device to enter a hibernation mode. During operation, the system creates a hibernation image for the computing device by identifying processes that do not have visible user interface elements, and generating the hibernation image so that processes with visible user interface elements can be reanimated from the hibernation image first to get the computing device reanimated quickly, while the identified processes are reanimated later. Next, the system stores the hibernation image in non-volatile storage. The system then causes the computing device to enter the hibernation mode, wherein the active state of the computing device is preserved in non-volatile storage while power to volatile storage is turned off.
Here’s Apple’s background and summary of the invention: “Power conservation is critically important for many types of computer systems. For example, portable computer systems need to conserve power in order to operate for long periods of time on battery power. Power conservation is also important for computer systems that directly (or indirectly) operate on A/C power to meet the strict power-usage requirements for Energy Star qualification.
“Many computer systems save power by entering a power-saving state known as ‘sleep mode,’ when they are not busy. During sleep mode, power is saved by placing much of the computer system in a low-power state, while power is maintained to volatile memory. Maintaining power to volatile memory preserves the active state of the computer system and thereby facilitates a nearly instant wake-up process, which provides an excellent user experience.
“One drawback of existing sleep systems is that if power is lost during sleep mode, any unsaved work in volatile memory disappears. This loss of power can be easily triggered if a user is distracted for a few hours, or takes too long when performing a sleep-swap of the system battery. Unfortunately, as computer systems begin to incorporate larger amounts of random-access memory (RAM), correspondingly more power is required keep this RAM memory powered up during sleep mode. At the same time, as portable computer systems become progressively thinner and lighter, they contain correspondingly smaller batteries.
“As a consequence of these trends, a few years ago, a laptop computer system could be expected to last multiple days in sleep mode, whereas at present, a new laptop computer system can rarely last more than a full day in sleep mode when it is configured with a maximum amount of RAM.
“One solution to this problem is to place the computer system into a hibernation mode, wherein the active state of a computing device is preserved while power to the computing device is turned off. Unfortunately, the response time for recovering from hibernation mode when a wakeup event is detected can be long, especially for computer systems configured with a maximum amount of RAM. Note that “response time” refers to the time it takes from the point when the computer system detects a wakeup event to the point the user can interact with the computer system.
“Hence, what is needed is a method and an apparatus that enables computer systems to quickly recover from a hibernation mode.
“One embodiment of the present invention provides a system that causes a computing device to enter a hibernation mode. During operation, the system creates a hibernation image for the computing device by identifying processes that do not have visible user interface elements, and generating the hibernation image so that processes with visible user interface elements can be reanimated from the hibernation image first to get the computing device reanimated quickly, while the identified processes are reanimated later. Next, the system stores the hibernation image in non-volatile storage. The system then causes the computing device to enter the hibernation mode, wherein the active state of the computing device is preserved in non-volatile storage while power to volatile storage is turned off.
“In a variation of this embodiment, the system reanimates the computing device by first reanimating processes with visible user interface elements from the hibernation image to get the computing device reanimated quickly, and then reanimating the identified processes.
“In a variation of this embodiment, while generating the hibernation image, the system evicts user pages for the identified processes into swap space in non-volatile storage, so that the user pages do not have to be part of the hibernation image, and can be swapped back in later as needed after the computing device is reanimated.
“In a variation of this embodiment, while generating the hibernation image, the system writes kernel pages and user pages for processes with visible user interface elements to a first portion of the hibernation image, wherein the first portion of the hibernation image is reanimated first. Next, the system writes pages for the identified processes that do not have visible user interface elements to a second portion of the hibernation image, wherein the second portion of the hibernation image is reanimated after the first portion. The system then marks operating system structures to ensure that a system pager does not swap out physical pages allocated to the user pages for the identified processes before the user pages for the identified processes can be restored during the reanimation process.
“In a variation of this embodiment, while identifying processes that do not have visible user interface elements, the system identifies processes that do not have visible user interface elements and which have a memory footprint above a threshold size.
“In a variation of this embodiment, the processes that do not have visible user interface elements can include processes that are associated with an off-screen session.”
The inventors are Dean Reece and Joseph Sokol. The graphic below illustrates a computing device in accordance with an embodiment of the present invention.

For more info on patents, check out Patents.com, a free patent search site.
If you like what you see at Macsimum News, if you read Macsimum regularly, if we cover your products/services, feel free to leave us a tip at the MACSIMUM TIP JAR.

Leave a comment ⇒
Please post the article topic & comment in our forums. No registration required.
Article Information
Comment on this Article Print this Article Email this Article Digg This
Contributor
Dennis Sellers
Dennis has been a newspaper editor/reporter (seven years) and teacher (seven years). He has over 10,000 magazine, newspaper and online articles to his credit. He has also covered the Mac and tech industries for over a decade for such online publications as MacCentral, MacMinute and now MacsimumNews.






