home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cis.ohio-state.edu!rutgers!princeton!beam.Princeton.EDU!luochen
- From: luochen@beam.Princeton.EDU (Luoqi Chen)
- Newsgroups: comp.unix.wizards
- Subject: Re: Saving process state
- Message-ID: <1992Jul27.214409.3995@Princeton.EDU>
- Date: 27 Jul 92 21:44:09 GMT
- References: <graham.712242002@galois>
- Sender: news@Princeton.EDU (USENET News System)
- Organization: Princeton University
- Lines: 21
- Nntp-Posting-Host: beam.princeton.edu
-
- From article <graham.712242002@galois>, by graham@maths.su.oz.au (Graham Matthews):
- >
- > I am on a Sun4 and want to save my entire process state to a
- > file, and then at some later time reload this state and continue
- > execution later exactly as if I had just continued running. Is
- > there any way to do this with SUN-OS?
- >
- > graham
- I did this once before when I was running a large number-crunching job on a sun
- sparcstation. I had been periodically dumping the image of the process, because
- the machine crashed too often. The core file containes everything about the
- process, the processor state, the data pages, so all you need to do is dump
- a core, with whatever method, gcore or ptrace(PTRACE_DUMPCORE,...). To resume
- the execution, set processor state to the saved value and write the saved
- data pages to the process address space. You can man page ptrace(2) for detail.
- I have a working version for SUNOS and also one for SGI iris. I can mail it to
- you if you want. There is a little problem with memory allocation in the SUNOS
- version, I haven't figured out a way to set the brk point of a child process
- from the parent, so I have to use static memory allocation instead.
-
- -lq
-