Transitioning to a suspend to RAM sleeping state while also protecting
against power losses while sleeping is provided. System state context
data is saved to non-volatile storage and components in the computer
system prepare to transition to a suspend to disc sleeping. A transition
to the suspend to RAM sleeping state is then effected. Alternatively,
after the system context is saved and the components are prepared to
transition, the system may wake to a working state. The components may be
directed to prepare for transitioning to a suspend to RAM sleeping state,
and then the BIOS may be directed to execute the transition. In either
embodiment, if power to the system is lost while the system is in the
suspend to RAM system state, then the system may resume to a working
state by reading the context file stored to non-volatile storage.