Difference between revisions of "Freezing the tree"

(rm level1 header, fix English, add see also)
m
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:Under the hood]]
+
== Introduction ==
[[Category:Empty articles]]
+
 
 +
Before we can start checkpointing processes, we have to make sure that they will not change their state. The latter not only includes opening new files, sockets, changing session and other, but also producing new children processes which, in turn, can escape from dumping procedure. In other words, the process tree itself and processes in it must be "immobilized" while we are dumping it. While sounds trivial in theory, it is problematic in real life. The checkpoint is supposed to be transparent to the application we are dumping, thus it must not notice any change in process state transition. Traditionally, processes are stopped with the stop signal, but doing so would disturb the process state.
 +
 
 +
So there are two ways to transparently stop the process tree:
 +
 
 +
* Capturing them with ptrace
 +
* Freezing them using [https://www.kernel.org/doc/Documentation/cgroup-v1/freezer-subsystem.txt freezer cgroup].
 +
 
 +
== Capturing with ptrace ==
 +
 
 +
== Using freezer cgroup ==
 +
 
 +
== See also ==
  
Before we can start checkpointing processes, we have to make sure that they will not produce new children processes which would escape from dumping procedure. In other words, the process tree must be persistent while we are dumping it. While sounds trivial in theory, it is problematic in real life. The checkpoint is supposed to be transparent to the application we are dumping, thus it must not notice any change in process state transition. Traditionally, processes are stopped with the stop signal. But we have a better choice - [https://www.kernel.org/doc/Documentation/cgroup-v1/freezer-subsystem.txt a freezer cgroup].
+
* [[Tree after restore]]
 +
* [[Checkpoint/Restore]]
  
 
== External links ==
 
== External links ==
  
 
* https://www.kernel.org/doc/Documentation/cgroup-v1/freezer-subsystem.txt
 
* https://www.kernel.org/doc/Documentation/cgroup-v1/freezer-subsystem.txt
 +
 +
[[Category:Under the hood]]

Latest revision as of 18:30, 15 March 2017

IntroductionEdit

Before we can start checkpointing processes, we have to make sure that they will not change their state. The latter not only includes opening new files, sockets, changing session and other, but also producing new children processes which, in turn, can escape from dumping procedure. In other words, the process tree itself and processes in it must be "immobilized" while we are dumping it. While sounds trivial in theory, it is problematic in real life. The checkpoint is supposed to be transparent to the application we are dumping, thus it must not notice any change in process state transition. Traditionally, processes are stopped with the stop signal, but doing so would disturb the process state.

So there are two ways to transparently stop the process tree:

Capturing with ptraceEdit

Using freezer cgroupEdit

See alsoEdit

External linksEdit