在Linux中使用Core Dump进行检查点/重新启动 [英] Checkpoint/restart using Core Dump in Linux
问题描述
可以使用进程的核心转储来实现检查点/重新启动吗?核心文件包含该过程的完整内存转储,因此从理论上讲应该可以 将进程还原到转储内核时的状态.
Can Checkpoint/restart be implemented using the core dump of a process? The core file contains a complete memory dump of the process, thus in theory it should be possible to restore the process to the same state it was in when the core was dumped.
推荐答案
否,没有内核的特殊支持,这通常是不可能的.内核维护着很多进程状态,例如文件描述符表,IPC对象等.
No, this is not possible in general without special support from the kernel. The kernel maintains a LOT of per-process state, such as the file descriptor table, IPC objects, etc.
如果您愿意做很多简化的假设,例如没有打开的文件,没有打开的套接字,没有活动的IPC对象,没有共享的内存区域等等,那么从理论上讲可能,但实际上,即使有这些让步,我也不认为Linux可以实现.
If you were willing to make lots of simplifying assumptions, such as no open files, no open sockets, no living IPC objects, no shared memory regions, and more, then in theory it would be possible, but in practice I don't believe it's possible with Linux even with those concessions.
这篇关于在Linux中使用Core Dump进行检查点/重新启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!