If Linux can't do that yet, are there plans for putting support for
suspend state into it?
_______________________________________________
Beowulf mailing list
Beo...@beowulf.org
http://www.beowulf.org/mailman/listinfo/beowulf
>
> Can anyone point me towards information how I can snapshot the entire
> system state to hard drive, and have an option to restore it at boot
> time?
>
Is there any OS that can store the state on the H/d? I would've thought this would be incredibly
difficult, as you'd have to store everything including CPU registers, peripheral state, PCI/AGP/ISA
processor state (??) etc and then do a memory dump (writing to disk, thus altering the system state)...
sounds like something the hardware would have to do...
> If Linux can't do that yet, are there plans for putting support for
> suspend state into it?
>
I think APM already does...
Mike
>
> Can anyone point me towards information how I can snapshot the entire
> system state to hard drive, and have an option to restore it at boot
> time?
>
> If Linux can't do that yet, are there plans for putting support for
> suspend state into it?
This works for laptops already, so linux supports it to at least that
extent. I >>think<< that special laptop bios calls are involved, and on
my laptop at least one has to set up a special disk partition for the
memory/state dump. I haven't looked at the kernel source to see whether
or not anything like this exists in regular kernels without bios support
-- I rather think not (for reasons given below). A good question for
the kernel list.
Other nonlinear possibilities for accomplishing this might be a
variation of "two-kernel monte" from scyld (?) or e.g. vmware.
Note that "the entire system state" isn't necessarily something that can
be stored or saved -- only the "Markovian" (history independent,
instantaneous) component of the state can be saved, unless the kernel
itself is VERY state aware and intelligent. Device initialization is
typically NON-Markovian. So a snapshot restore will generally not bring
a network device or a CD-player or SCSI card or anything else that has
been moved out of the default power-on state by means of a handshaking
interaction or download of BIOS back into the same state it was in at
powerdown time (without a VERY SMART snapshot program and device-state
aware kernel). Devices that are indeed in a different state from that
presumed by the "saved" kernel image can crash the system almost
immediately or cause other, lesser problems.
On my laptop I generally don't crash, but if I do a suspend at Duke
(attached to one network) and restore at home (attached to a different
network with a different, e.g. IP number) the network, at least, is
broken (all sockets, NFS mounts, and so forth included) and must be
restarted. From the little I've done with e.g. Adaptec SCSI adapters
(which generally require this big chunk of very picky code to be
downloaded to the adapter at boot time, followed by a very precise set
of initialization instructions that match the kernel configuration with
regard to e.g. reset delays and tagged queue depth) I'd expect this to
be all but impossible on SCSI equipped systems that reset the adapter
from the power-on state. IDE and IDE-ATAPI seems to work well enough;
they are presumably less state-sensitive, although I'd bet that
IDE-ATAPI CDR's (with a scsi interface) get bollixed up.
It's usually easier to just write your application(s) to accept a
user-defined signal and do a checkpoint/suspend, but in the case of e.g.
PVM applications even THAT is not likely to work without a lot of effort
because reconstruction and restarting of the running calculation again
requires configuring the virtual machine, which is basically
non-Markovian (at least with respect to the running program images). A
"restart" from saved data is then going to be easier than a "resume"
from anything like an actual image. Imagine trying to restart from
suspend/crash just one PVM client while the others continued in the
calculation (something I've tried to arrange a time or two in the past).
It can be done but it is non-trivial.
A tough problem. I'm curious to see if any more recent work has been
done on it in other answers to your question.
rgb
--
Robert G. Brown http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567 Fax: 919-660-2525 email:r...@phy.duke.edu
Yes. Almost any Windoze-running laptop can do it, with BIOS help, but it
doesn't have to be BIOS helped. The first modern OS that could do it might
be Hydra from the late 1960's.
I thought that the Linux laptop folks were working on this kind of thing. It
can be handy for clusters.
-- g
There's the classic "suspend to disk" stuff that laptops do (which linux
works with, at least with my ancient Pentium 90 IBM thinkpad it does).
Though I think since the suspending is done in hardware, that Linux
doesn't even know about it.
I know AOpen (www.aopen.com) has a motherboard that advertises this
functionality in hardware. Whether it'll work with Linux, I don't know.
For non-hardware assisted suspend stuff, check out swsusp:
http://falcon.sch.bme.hu/~seasons/linux/swsusp.html
http://www.suse.de/~garloff/TravelMate/swsusp.html
Quoted from the swsusp.desc:
Enable the possibilty of suspendig machine. It doesn't need APM.
You may suspend your machine by either pressing Sysrq-d or with
'swsusp' or 'shutdown -z <time> (patch for sysvinit needed). It
creates an image which is saved in your active swaps. By the next
booting the kernel detects the saved image, restores the memory from
it and then it continues to run as before you've suspended.
If you don't want the previous state to continue use the 'noresume'
kernel option.
.adam
--
[ Adam Lazur <alazur at plogic dot com> ]
[ Paralogic Inc. - www.plogic.com - www.xtreme-machines.com ]
> Is there any OS that can store the state on the H/d? I would've thought this would be incredibly
> difficult, as you'd have to store everything including CPU registers, peripheral state, PCI/AGP/ISA
> processor state (??) etc and then do a memory dump (writing to disk, thus altering the system state)...
> sounds like something the hardware would have to do...
Solaris 7 does this quite nicely. We use this feature during long power
outages
Tim
Tim Carlson Voice: (505) 984-8800x255
Director of Computing: Santa Fe Institute Fax: (505) 982-0565
WWW: http://www.santafe.edu/~tim Email: t...@santafe.edu
There is an experimental linux kernel patch to do what you are looking
for. It can be found at:
http://falcon.sch.bme.hu/~seasons/linux/swsusp.html
It seemed rather buggy last time I tried it, but looks like it has been
updated since then.
-Phil
Phil Carns
pca...@hubcap.clemson.edu
> > >
> > > Can anyone point me towards information how I can snapshot the entire
> > > system state to hard drive, and have an option to restore it at boot
> > > time?
> >
> > Is there any OS that can store the state on the H/d? I would've thought this would be incredibly
> > difficult, as you'd have to store everything including CPU registers, peripheral state, PCI/AGP/ISA
> > processor state (??) etc and then do a memory dump (writing to disk, thus altering the system state)...
> > sounds like something the hardware would have to do...
> >
> > > If Linux can't do that yet, are there plans for putting support for
> > > suspend state into it?
My Sony VAIO has a standby to disk that does just that. Writes everything
to the disk then powers down. When you power back up it restores everything
just like it was. Works great with Linux, XWindows, applications and
everything. Sometimes the network even gets through it (but I usually
ifconfig down first).
BTW, this is supported in the BIOS and is OS independent (certainly wasn't
designed for Linux).
Walt
--
Dr. Walter B. Ligon III
Associate Professor
ECE Department
Clemson University
> Can anyone point me towards information how I can snapshot the entire
> system state to hard drive, and have an option to restore it at boot
> time?
>
> If Linux can't do that yet, are there plans for putting support for
> suspend state into it?
As many people have already responded, laptops can suspend to and recover
from disk, but most non-laptop systems cannot.
Most older PC hardware has hidden registers that the OS cannot recover.
A major problem is the standard PC video adapters, serial ports and sound
cards.
Laptop BIOSes avoid this problem by knowing the details of the hardware.
The only unknown hardware is PCMCIA cards and USB devices, recent devices
which the OS must explicitly handle.
Read the datasheet of a laptop support chipset to understand the problem,
and the many hooks into the "PC standard" hardware to work around it.
Sun hardware is much the same as a laptop -- Sun has complete control over
the hardware design of the system. (Open Firmware plays a role as well.)
Donald Becker bec...@scyld.com
Scyld Computing Corporation http://www.scyld.com
410 Severn Ave. Suite 210 Beowulf-II Cluster Distribution
Annapolis MD 21403
>
> Can anyone point me towards information how I can snapshot the entire
> system state to hard drive, and have an option to restore it at boot
> time?
>
> If Linux can't do that yet, are there plans for putting support for
> suspend state into it?
Hi.
Maybe what you are really looking for is a way to stop one or more
processes and save them to disk, instead of the entire system state. This
is a feature I would think could be extremely useful, but I'm not sure
anyone is implementing a way to do this. Anyone know?
--
Ketil Froyn The probability of someone
University of Oslo watching you is proportional
Norway to the stupidity of your action.
There are several such systems. Condor does it, RWCP's Score-on-Linux does
it, and there's a guy in Brazil who has a fairly ugly x86-only checkpoint.
You often have to add hacks to support stuff, i.e. re-open MPI sockets.
-- g
Walt
--
Dr. Walter B. Ligon III
Associate Professor
ECE Department
Clemson University
_______________________________________________