Subject: Re: persistent/restorable unix procs?
To: Travis Hassloch <email@example.com>
From: Guenther Grau <firstname.lastname@example.org>
Date: 11/29/1995 13:33:54
> Has anyone done any work on (or looking into) how one might dump a process's
> state to disk & restore it, assuming it's a cooperating process?
This is quite easy. The process must just know what he wants to save. Send it a
signal and it can react to this and save it's state. Next time it's started, just
inform it, that it should reload it's state from the saved file.
> E.G. maybe you have a process that wants to save itself on purpose.
> To make it harder, how about an uncooperative process?
Hmm, I haven't looked into it, but I don't think such a thing exists. There are
some Unixes out there that support saving the whole memory to disk, i.e. that you
can stop working, save everything, and next time you want to continue, you can just
press a button and everything is reloaded, not rebooted! So you can continue your
work just where you stopped it. This feature works on some versions of AIX for
notepads, where you'd expect only one user to save his work. Note that you cannot
use the machine for different thigs in between. I'm not sure if Solaris has
> Is this possible under stock Unix (specifically, stock NetBSD)?
Hmm, to a certain extend yes, see above, not in NetBSD, though.
> I know there are some issues regarding shared code segments...
> Probably a lot more issues regarding stuff that isn't exactly in it's
> address space... I'm wondering if someone has attacked this thing already.
> ...it's just something I've been musing over w.r.t rollbacks and/or
> window manager "sessions"...
It is possible to do this with sessions! This requires cooperative processes and is
defined e.g. in the X protocol. When you finish a session the
session-manager/window-manager can send certain commands to all applications and if
these applications support this (i.e. are cooperative), they will save their state.
Have a closer look at the ICCCM protocol that X defines.
> CC me in replies, thanks....
Well, I did even more, I sent this mail directly to you :-)
> PS: when one process forces another to rollback, it is said to wound it
> (acc. to Silberschatz)... is that pronounced "wownd" or "woond"?
Dunno, but I'd say "wownd", but take into account that I don't speak English very
well (being a German :-).