TuxOnIce development has been sponsored by:
|
Next
Previous
Contents
For the more curious users, briefly listed here are the steps of the kernel part
of the hibernation process. This may also help in tracking why it doesn't hibernate.
- Stop all processes. If some processes can't be stopped, abort.
- Eat memory. At this stage we check if we have enough memory to save the
image and meet your specifications for maximum image size. If necessary, we
unfreeze the processes, eat memory until we think we have enough and then try
again from step 1.
- Suspend drivers. This accounts for the screen briefly going blank on
some computers.
- Prepare a directory of pages and save it along with the image. This
is done in two parts. First, all of the pages we know aren't needed for
hibernation (ie, not buffer & page caches) are saved, being very careful not to have
a lasting impact on the image we're making. Then, an atomic copy is made
of the remaining pages (kernel & process space) using the memory just
saved and any other free RAM. This copy is then saved. Finally, we save
the page directory for the latter set of pages separately and also store
the page directory's location in the swap header. We can then (if your
computer supports it) power down.
Resuming is essentially the reverse of this process. The pagedir is
loaded, as is the copy (being careful not to use RAM we're about to
overwrite). Then we copy the old kernel back and restore registers. We
are now running with the original kernel image. Finally, we load the
first set of pages we saved, clean up and exit.
Next
Previous
Contents
Last updated: Sat, 27 Dec 2008 08:04:29 +0800
Frozen penguins image by darkmetal
and adapted by Nigel Cunningham
"Tuxsicle" artwork by Pierre-Philippe Coupard
Copyright © 2003-2005 Bernard B
|