Hibernate (OS feature)

From Wikipedia, the free encyclopedia

Jump to: navigation, search

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.[1]

Contents

[edit] Operating system support

[edit] Microsoft Windows

Windows 95 & Windows 98 supported hibernation through hardware manufacturer-supplied drivers and only if compatible hardware and BIOS were present. Since Windows 95 supported only Advanced Power Management (APM), hibernation was then known as Suspend-to-Disk. Windows 98 and later support ACPI. However, hibernation worked flawlessly on relatively few systems since most hardware was not fully ACPI 1.0 compliant or did not have WDM drivers. There were also issues with the FAT32 file system.[2] Microsoft Windows 2000 and later support hibernation at the operating system level (OS-controlled ACPI S4 sleep state) without special drivers from the hardware manufacturer. The file is called "hiberfil.sys" and is the same size as the total RAM. The file resides in the root of the system partition, usually "C:\hiberfil.sys". The file is a hidden system file. This file is a full snapshot of the physical memory RAM compressed with LZXPRESS algorithm, and contains further information like Processor state. Although, this file is undocumented, a security researcher Matthieu Suiche, documented it [3] during Black Hat Briefings 2008 and provides a Computer forensics framework to manage and convert this file into a readable memory dump[4]. Windows Me also supports OS controlled hibernation and requires half the amount of disk space of the computer's RAM. Windows XP further improves support.[5] On Windows computers, hibernation is available only if all the hardware is ACPI compliant, 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.

Prior to Windows Vista it was not possible for a system administrator to enable hibernation without resorting to third party software[6] or configuring the feature during deployment. This omission by Microsoft led to the feature being underused in the enterprise.

Special care should be taken not to forget that the system is hibernating as opposed to being shut down, as removing the hard drive and moving it to another system can lead to an unusable hard drive.

[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.[7] 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.[8] 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 suspend). 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[9]

[edit] See also

[edit] References

  1. ^ [1]http://www.acpi.info/DOWNLOADS/ACPIspec30b.pdf - ACPI Specification Rev 3.0b
  2. ^ BIOS and Hibernate Issues for FAT32 File System
  3. ^ [2]
  4. ^ [3]
  5. ^ Windows Power Management: Instant PC availability and energy savings
  6. ^ Enable hibernate using group policy
  7. ^ Apple Support: Progress bar appears after waking from sleep
  8. ^ http://web.archive.org/web/20080105000720/http://andrewescobar.com/archive/2005/11/11/how-to-safe-sleep-your-mac/
  9. ^ http://lists.tuxonice.net/lurker/message/20080716.071015.bd394e94.en.html

[edit] External links

Personal tools