4 ms·
Part of it is hardware support- your machine's state isn't just in main ram and CPU registers, it's also in the state of every embedded microcontroller and onbo
by dannypgh 7y ago
Part of it is hardware support- your machine's state isn't just in main ram and CPU registers, it's also in the state of every embedded microcontroller and onboard memory of every device on the machine.
It's to limit the complexity of suspend/resume that a lot of OSes will do things like reinitialize all drivers (e.g. unload/load kernel modules) to try to get the whole system into a known state, but this takes time.
Relatedly, hardware can be added (or enabled) between boots, so whatever conditional hardware initialization was done when booting may result in a state that's not quite accurate later. Furthermore, some of the state (e.g. anything involving system time) will always need to be modified after restore, and that's a state transiston that's less well tested (moving your clock forward hours or days may make a lot of software flake out).