[CALUG] Saving/restoring process states

Jason C. Miller jason.c.miller at gmail.com
Tue Apr 4 12:13:48 CDT 2006


My questions are rarely simple...and here's another one.  ;)

Does anybody know of a method (or backdoor hack) that would allow a user 
to dump the current state of a process and then restore it later?  Kind of  
analogous doing a <ctrl>-Z and then an 'fg' later when you want to 
unsuspend the proc except, in my instance, the process would be kill()ed 
for later resurection.  Kinda like high-level context switch.  

If you're still confused as to what I mean, here's the example that 
started me wondering...

I was using a game emulator that doesn't have a "save/restore game state" 
function.  I figured it wouldn't behoove me too terribly much to try to 
come up with something on my own.  Say I've been playing for hours and I'm 
tired.  I really don't want to use the game's actual "Save" utility 
because it might start me at some predetermined checkpoint the next time I 
started the game (eg: metroid, zelda).  So, I'd use this magical utility 
that I would like to save the current state of the process somewhere on 
non-volatile storage.  Later (after so many days and so many reboots), I 
restore that process and continue exactly where I left off.  

Questions:
1. Does UNIX already have a method for doing this that I don't know about?
2. My OS fundamentals are rusty.  Any reason why an OS wouldn't be able to 
   support this? (waiting for the OS profs out there to chime in on this 
   one).  I understand that register values and such would be a problem, 
   but if the process was suspended first, would that make a difference?
3. Any ideas anyone?

                                    -jason




-- 



More information about the lug mailing list