Linked by Thom Holwerda on Thu 16th Oct 2008 22:08 UTC, submitted by diegocg
Permalink for comment 334039
To read all comments associated with this story, please click here.
To read all comments associated with this story, please click here.





Member since:
2007-08-22
Not sure how Linux does it - haven't looked at the source at all - but it could theoretically be faster than a normal boot operation. How?
Well, basically the various parts of the system would have to load the new kernel, temporarily halt (perhaps the processors System-Maintenance Mode?), serialize the states of everything in a special manner, start the new kernel with the serialized data, the deserialize everything and continue. You don't even have to necessarily stop all the hardware - just pause the I/O between the serialization/deserialization steps.
So while boot may take 5 seconds - and you have to go through POST, do all kinds of initialization, etc. - kexec() style rebooting could very well be under 1 second since you skip the whole POST step, and you can even skip most of the initialization steps if you serialize/deserialize correctly.
Of course, you have to have two kernels that understand the same serialization structures. So it would have to be versioned and you would have to have some way to fall back to the old kernel in case the new one had a problem in the deserialization.