The power saving modes and the transition between them is usually implemented using ACPI.
It supports both s2ram ("standby") and s2disk ("hibernate"), as well as a mode called "s2both", which saves state to disk and RAM.
ACPI |
Linus Torvalds, initial creator of the Linux kernel, in November 2003 described ACPI as "a complete design disaster in every way".
Some operating system kernels, such as Linux, still use triple faults as a last effort in their rebooting process if an ACPI reboot fails.