Hibernate (OS feature)
From Wikipedia, the free encyclopedia
Hibernate (also known ambiguously as sleep mode) is a feature seen in many operating systems where the contents of RAM is written to non-volatile storage, such as the hard disk (as either a file or on a separate partition) before powering off the system. Later the system can be restored to the state it was in when hibernating, so that programs can continue executing as if nothing happened. Hibernating and restoring from hibernate is also generally faster than a hard reboot and, if necessary, can be done without user interaction (unlike shutting down, which often requires the user to specify if open documents should be saved).
To use hibernation the hard disk needs to have at least as much free space as there is RAM on the system.
Hibernation is often used on laptops and can generally be set to happen automatically on a low battery alarm. Early implementations of hibernation did use the BIOS but on modern systems the functionality is usually handled by the operating system. Hibernation is defined as sleeping mode S4 in the ACPI specification.
Contents |
[edit] Operating system support
[edit] Windows
Microsoft Windows 2000 and later support hibernation at the operating system level without special drivers from the hardware manufacturer. The file is called "hiberfil.sys" and is the same size as total RAM. The file resides in the root of the system partition, usually "C:\hiberfil.sys". The file is a hidden system file. Windows 98 and Windows Me also supported hibernation and required half the amount of disk space of the computer's RAM. Usually, on Windows computers, hibernation is available only if all the hardware is Plug-and-play and all the drivers are PnP-compatible.
Windows Vista can also make use of the flash memory built into a hybrid drive to store some or all of the contents of the computer's memory when entering hibernation mode. This is expected to significantly improve the performance of entering and exiting hibernation.
[edit] Mac OS
Safe Sleep, the Mac equivalent of hibernate, has been available for new Mac models starting with an October 2005 revision of the PowerBook G4. Shortly after Apple started supporting Safe Sleep, Mac enthusiasts released a hack to enable this feature for much older Mac computers running OS X 10.4. Classical Mac OS once also supported hibernate, but this feature was dropped by Apple.
[edit] Linux
In the Linux kernel, Hibernate or suspend-to-disk is implemented by swsusp which is inbuilt into the 2.6 series. An alternative implementation is Suspend2 which is available as patches for the 2.4 and 2.6 kernels. It provides advantages such as support for SMP, 4GB high mem and preemption. Currently work is being done on merging Suspend2 into the mainline kernel.