home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / wizards / 3330 < prev    next >
Encoding:
Internet Message Format  |  1992-07-27  |  1.6 KB

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