Hibernate (OS feature)

From Wikipedia, the free encyclopedia

Hibernate 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 hibernation was invoked, 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 Me also supports hibernation and requires 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's Fast Sleep and Resume feature saves the contents of volatile memory to hard disk before entering Sleep mode. If power to memory is lost, it will use the hard disk to wake up. The user has the option of hibernating directly if they wish. 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

On Macs, a feature known as Safe Sleep saves the contents of volatile memory to the system hard disk each time the Mac enters Sleep mode. The Mac can instantaneously wake from sleep mode if memory has not been lost. However, if power supply was interrupted, such as when swapping batteries without AC power connection, the Mac would wake from Safe Sleep instead, restoring memory contents from the hard drive. [1] Because Safe Sleep's hibernation process occurs during regular Sleep, the Apple menu does not have a "hibernate" option.

Safe Sleep capability is found only in new Mac models starting with the October 2005 revision of the PowerBook G4 (Double-Layer SD). Mac OS X v10.4 or higher is also required.

Shortly after Apple started supporting Safe Sleep, Mac enthusiasts released a hack to enable this feature for much older Mac computers running Mac OS X v10.4[1]. Classical Mac OS once also supported hibernate, but this feature was dropped by Apple.[citation needed]

[edit] Linux

In the Linux kernel, Hibernate or suspend-to-disk, suspend-to-ram, suspend-to-file is implemented by swsusp which is built into the 2.6 series. An alternative implementation is TuxOnIce which is available as patches for the 2.4 and 2.6 kernels. Other alternative implementations also exist, namely, uswsusp (user-space). TuxOnIce provides advantages such as support for SMP, 4GB high mem and preemption. Currently work is being done on merging TuxOnIce into the mainline kernel[citation needed].

[edit] See also

[edit] Notes

  1. ^ Apple Support: Progress bar appears after waking from sleep

[edit] External links