restarting core images
Tom Christiansen
tom at puff.UUCP
Fri Apr 4 23:08:17 AEST 1986
OS: BSD4.3 UNIX w/ Sun NFS
CPU: MicroVax II WorkStations, Vax 7[58]0's
Does anyone out there have any experience with restarting core images as
generated either by the core() function out of sys/kern_sig.c or by the
gcore program? The end goal is to be able to checkpoint a process for
eventual restarting, possibly but not necessariily on a different machine.
I see two major difficulties: retaining open files and restoring all
three segments.
I think I can deal with retaining open files, providing we're talking
about a real file, rather that a socket or a device: just record where
the current r/w pointer is, seek to the start of the file and write it
somewhere, like core.pid.fd0, core.pid.fd1, etc. Then when you want
restart the core image, open these files and seek to the correct
point. This way you don't even have to know the names of the files.
Anyone think of any reason that would require knowledge of the file
names themselves?
I know how rogue saves things; it just writes out its entire data
segment, does an sbrk() of the write size on restart, and just writes
the old data segment there. But how do you restore the old stack?
Could you use the same trick but instead of sbrk(), just call a
recursive function until you stack is big enough?
Thanks,
tom
--
Thomas Scott Christiansen, Project Assistant
Computer Systems Lab
Department of Computer Sciences
University of Wisconsin, Madison
UUCP: ...!{harvard,ihnp4,seismo,topaz}!uwvax!tom
ARPA: tom@{rsch,crys,limburger,puff,gumby,pokey,devo}.wisc.edu
More information about the Comp.unix.wizards
mailing list