Storing entire process state on disk and restoring it later? (On Linux/Unix)

梦想与她 提交于 2019-12-04 16:26:22

问题


I would like to know: Is there a system call, library, kernel module or command line tool I can use to store the complete state of a running program on the disk?

That is: I would like to completely dump the memory, page layout, stack, registers, threads and file descriptors a process is currently using to a file on the hard drive and be able to restore it later seamlessly, just like an emulator "savestate" or a Virtual Machine "snapshot".

I would also like, if possible, to have multiple "backup copies" of the program state, so I can revert to a previous execution point if the program dies for some reason.

Is this possible?


回答1:


Something like this? You can also check out the checkpointing page on wikipedia.




回答2:


You should take a look at the BLCR project from Berkeley Lab. This is widely used by several MPI implementations to provide Checkpoint / Restart capabilities for parallel applications.




回答3:


A core dump is basically this, so yes, it must be possible to get.

What you really want is a way to restore that dump as a running program. That might be more difficult.



来源:https://stackoverflow.com/questions/5697720/storing-entire-process-state-on-disk-and-restoring-it-later-on-linux-unix

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!