是否有可能中断的过程和检查点它来恢复它以后? [英] Is it possible to interrupt a process and checkpoint it to resume it later on?

查看:154
本文介绍了是否有可能中断的过程和检查点它来恢复它以后?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

比方说,你有一个应用程序,它消耗了所有的计算能力。现在,你想要做一些其他必要的工作。有什么办法在Linux上,中断该应用程序和检查点的状态,这样以后它可以从它被中断的状态恢复?

Lets say, you have an application, which is consuming up all the computational power. Now you want to do some other necessary work. Is there any way on Linux, to interrupt that application and checkpoint its state, so that later on it could be resumed from the state it was interrupted?

特别是我感兴趣的方式,其中应用程序可以停止和重新启动另一台机器上。这是可能的吗?

Especially I am interested in a way, where the application could be stopped and restarted on another machine. Is that possible too?

推荐答案

在一般方面,检查点的处理是不完全可能的(因为一过程不仅一个地址空间,而且还具有其它资源喜欢文件描述符和TCP / IP套接字...)。

In general terms, checkpointing a process is not entirely possible (because a process is not only an address space, but also has other resources likes file descriptors, and TCP/IP sockets ...).

在实践中,你可以像使用 BLCR 等一些检查点库有了一定的限制条件,你也许能够从一个系统迁移检查点图像到另一个(非常类似于来源之一:同样的内核,库和放的相同版本,编译器等)。

In practice, you can use some checkpointing libraries like BLCR etc. With certain limiting conditions, you might be able to migrate a checkpoint image from one system to another one (very similar to the source one: same kernel, same versions of libraries & compilers, etc.).

迁移的图像,也可以在虚拟机的水平。其中一些是针对相当不错的。

Migrating images is also possible at the virtual machine level. Some of them are quite good for that.

您还可以设计并用自己的检查点机械实现你的软件。然后,你应该考虑使用垃圾收集技术和术语。也期待到Emacs(或 XEmacs的)的 unexec.c 文件(这在很大程度上依赖于机器的)。

You could also design and implement your software with your own checkpointing machinery. Then, you should think of using garbage collection techniques and terminology. Look also into Emacs (or Xemacs) unexec.c file (which is heavily machine dependent).

有些语言实现与功放;运行时有检查点的原语。 SBCL (免费Common Lisp实现)能够的保存核心映像并重新启动它。 SML / NJ能够输出图像佳乐(一Smalltalk的实现)也有这样的能力。

Some languages implementation & runtime have checkpointing primitives. SBCL (a free Common Lisp implementation) is able to save a core image and restart it later. SML/NJ is able to export an image. Squeak (a Smalltalk implementation) also has such ability.

作为检查点的其他例子,GCC编译器实际上是能够编写一个 *的.h 头(成pre-编译头文件,它是通过使用持久性技术GCC堆持久映像)

As an other example of checkpointing, the GCC compiler is actually able to compile a single *.h header (into a pre-compiled header file which is a persistent image of GCC heap) by using persistence techniques.

了解更多关于正交持久性。这也是一个研究课题。 系列化也是相关的(你可能想使用文本格式点菜JSON,YAML,XML, ...)。您还可以使用休眠技术(对整个系统级)。

Read more about orthogonal persistence. It is also a research subject. serialization is also relevant (and you might want to use textual formats à la JSON, YAML, XML, ...). You might also use hibernation techniques (on the whole system level).

这篇关于是否有可能中断的过程和检查点它来恢复它以后?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆