Advertisement

Operating system feature request: hibernate a process

Started by March 01, 2009 07:54 AM
6 comments, last by RivieraKid 15 years, 8 months ago
hi all, I would like to be able to to save a process state to file and recover it later (after reboot, or maybe even on another computer!). Do you know if such a feature exists? if not, do you think it will be possible/difficult to implement? Linux has the option to stop a process (ie. ctrl-z) and continue later, but that only works in the parent terminal, while its alive. There is also the option to dump all the process memory to a core file and examine it post mortem, but you can't (or at least I haven't found the way) to save a process to file and continue later. Of course it is possible to pause a virtual machine like VMWare, but thats not quite it, as it can't run several processes and save one of them. Perhaps though, a virtual machine like Java or .NET is a proper direction to a solution, although I would reallly love if it can be activated on any old process. I know things such as sockets, file pointers, system locks, message queues, etc may be troublesome. This leads me to believe that such a "hibernate process" feature will have to be an OS feature, not a user application (though maybe some system hooks are enough). I don't remember/know details about virtual memory, dynamic loaded libraries, and probably many other related aspects. Anyway, what do you think? can it be done?
Quote: Original post by Iftah
Anyway, what do you think?
can it be done?

Yes (CryoPID), definitely (a list of checkpointing software, though not necessarily all implemented independently of the application, or limited to a single process). Note that the CryoPID software itself is a user-level process (on Linux), and not an OS-level construct; while some OS support is necessary for this type of feature, it doesn't necessarily need to be specialized to the level of specifically being designed for saving a process to disk.

Note: For CryoPID, the actual maintained implementation is available at http://sourceforge.net/projects/cryopid2, though most of the information is at the link I posted. It makes a decent example, though you also may have difficulties should you try building it on a recent kernel/distro as some of the exported facilities it used have gone AWOL.

[Edited by - crusadingknight on March 1, 2009 10:20:08 AM]
Advertisement
great :)

I was not aware of the term "Checkpointing software",
CryoPID looks great, and will be useful for me.

thanks!
The Old New Thing: Why can't the system hibernate just one process?

[Website] [+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++]

I wanted this feature forever. I always assumed that windows would end up putting it in. I mean often I have like 3 IDEs open and FF open and all of a sudden I want to play a game with some friends. I end up having to close my applications since I don't have the option of hibernating them until I need them again.
eh?
run the game, things which aren't needed get swapped out.
Your IDEs will all be running an event model so they won't take CPU time until they wake up.
Granted, FF could be a problem if it keeps running things like Flash in the background.
Advertisement
Quote: Original post by phantom
eh?
run the game, things which aren't needed get swapped out.
Your IDEs will all be running an event model so they won't take CPU time until they wake up.
Granted, FF could be a problem if it keeps running things like Flash in the background.
It's never seems to be that simple. The RAM usage is always still there and it ends up paging and runs poorly compared to if no programs are running. (I plan to upgrade to Windows 7, maybe it fixed some of this stuff). XP tends to go into some kind of paging death randomly where it will run super slow for me.

Quote: Original post by phantom
eh?
run the game, things which aren't needed get swapped out.
Your IDEs will all be running an event model so they won't take CPU time until they wake up.
Granted, FF could be a problem if it keeps running things like Flash in the background.


perfectly optimised apps and conditions.

This topic is closed to new replies.

Advertisement