Patent ID: 7231547

Claim:
A method of operating a data processing system, having a system context, comprising a first storage medium having a current system memory context, which includes data relating to the system context, and a second non-volatile storage medium; the system being operable in a plurality of states, each state having an associated level of system power consumption; and a power management system for saving the system memory context to the second non-volatile storage medium in preparation for entering at least one of the plurality of states; the method comprising the steps of: storing an indication of whether the system has been shutdown correctly or incorrectly; providing a schedule for outputting data representing at least the portion of the current system memory context; executing, during a working state of the plurality of states, an interrupt at intervals determined by the schedule and outputting, using the power management system and in response to the interrupt, data representing at least a portion of the current system memory context for storage on the second storage medium; determining, upon initialisation of the system, from the indication of whether the system has been shutdown correctly or incorrectly, that the system was previously shutdown incorrectly and recovering, in response to that determination, the data from the second storage medium and restoring the system memory context using the recovered data.