From: Bernard Blackham <bernard@blackham.com.au>
To: lokum spand <lokumsspand@hotmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: A possible idea for Linux: Save running programs to disk
Date: Sun, 2 Oct 2005 12:53:15 +0800 [thread overview]
Message-ID: <20051002045315.GA20946@ucc.gu.uwa.edu.au> (raw)
In-Reply-To: <BAY105-F35A25DA28443029610815DA48E0@phx.gbl>
On Sat, Oct 01, 2005 at 01:30:22PM -0800, lokum spand wrote:
> Suppose Linux could save the total state of a program to disk, for
> instance, imagine a program like mozilla with many open windows. I give
> it a SIGNAL-SAVETODISK and the process memory image is dropped to a
> file. I can then turn off the computer and later continue using the
> program where I left it, by loading it back into memory.
www.checkpointing.org lists several solutions for this.
I'm the author of CryoPID[1] - it's a checkpointing program that
allows you to save the state of a process to a file without any
prior thought when linking or running the process. It won't handle
an entire mozilla process, but single-threaded console-based apps
are quite feasible. Migration between machines works too - 2.6 to
2.6 works, 2.4 to 2.4 works, 2.6 to 2.4 works, and 2.4 to 2.6 mostly
works with some TLS emulation (which might be incomplete, but can
always be improved).
Open files are reopened. Opened temporary files (unlinked) could
potentially be restored by scraping the contents out of the file
while the process in question has it open.
Networking isn't too bad really so long as you keep the same IP. TCP
sockets can be handled by tcpcp[2] which is already supported by
CryoPID. UDP sockets are pretty trivial, but not yet done. For both
of these to be reliable though, there needs to be some sort of
arrangement to drop packets on these connections whilst they are
suspended and not have the kernel send an RST back. (Thinking a
daemon that drives some iptables).
Unix sockets are indeed trickier. Mostly this is for X applications,
and for this I'm actually looking towards toolkit-based solutions as
apps can't be expected to deal with things like colour depth changes
and so on. Gtk+ can already migrate applications between displays,
with the only issue being that not all the resources tied to the
original X server are freed, so you can't lose it. This is scheduled
to be fixed for Gtk+ 2.10 though, so I'm holding out hope for this.
Multithreading or even multiple processes will be a fun one though.
Ditto for shared memory and other IPC stuff. Determined that it's
possible, just not sure how yet. :)
As for portability, it was written for x86 and has been ported to
AMD64, and I'm also in the middle of porting it to sparc. (ppc and
alpha planned too).
Yes, it has to do some pretty vile things to avoid modifying the
kernel or userspace programs, but it's quite suitable for doing
things like backing up your irssi sessions hourly, saving
computational jobs across a reboot or moving them to another
machine, or showing off features of an application.
Bernard.
[1] http://cryopid.berlios.de/
[2] http://tcpcp.sf.net/
next prev parent reply other threads:[~2005-10-02 4:53 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-01 21:30 lokum spand
2005-10-01 21:39 ` Arjan van de Ven
2005-10-01 22:21 ` Michael Concannon
2005-10-01 22:51 ` lokum spand
2005-10-01 23:09 ` Michael Concannon
2005-10-02 8:30 ` Tomasz Torcz
2005-10-02 13:31 ` Benoit Boissinot
2005-10-02 18:49 ` Jon Masters
2005-10-02 19:21 ` Lexington Luthor
2005-10-02 0:34 ` grundig
2005-10-02 4:53 ` Bernard Blackham [this message]
2005-10-02 12:57 ` Ed Tomlinson
2005-10-02 14:16 ` Bernard Blackham
2005-10-10 1:13 ` serue
2005-11-06 15:42 ` Bernard Blackham
2005-11-09 2:15 ` Peter Chubb
2005-10-02 5:36 ` Andrew Haninger
2005-10-03 17:41 ` Adrian Bunk
2005-10-03 18:52 ` Andrew Haninger
2005-10-03 18:59 ` Adrian Bunk
2005-10-03 19:48 ` Andrew Haninger
2005-10-02 18:46 ` Jon Masters
[not found] <4SXfo-7hM-9@gated-at.bofh.it>
2005-10-02 3:19 ` Bodo Eggert
[not found] ` <4T47e-5E-1@gated-at.bofh.it>
[not found] ` <4TbLq-2VG-5@gated-at.bofh.it>
[not found] ` <4TcR9-4sS-9@gated-at.bofh.it>
2005-10-02 17:08 ` Bodo Eggert
2005-10-02 17:51 ` Bernard Blackham
2005-10-02 19:13 ` Jeff Dike
2005-10-03 20:02 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051002045315.GA20946@ucc.gu.uwa.edu.au \
--to=bernard@blackham.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=lokumsspand@hotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®