Patent ID: 8327171

Claim:
A method for generating a hibernation image before entering a sleep mode, comprising: in a computing device, performing operations for: determining that the sleep mode is to be entered; before entering the sleep mode, when the computing device is capable of entering a hibernation mode, performing operations in preparation for entering the hibernation mode, comprising: evicting pages for idle processes from a memory in the computing device to reduce a number of pages to be written to the hibernation image on a disk in the computing device; marking remaining pages in the memory as either to be written to disk or not to be written to disk, wherein pages that are already available on the disk or that can be reconstructed from other information on the disk are marked as not to be written to disk, and other pages are marked as to be written to the disk; and writing pages that are marked as to be written to the disk to the hibernation image on the disk; and entering the sleep mode.