After "OOM Killer" is there a "Resurrector"?

I understand that Linux has a kernel functionality called "OOM Killer". When the OOM (Out-of-Memory) condition disappears , is there such a thing as a "Process Resurrector"?

As far as I understand, this functionality will be difficult to implement for various reasons, but is there anything close to it?

Edit : Example: "Resurrector" will have a guaranteed memory block for storing a limited set of information about technologies (for example, command line, environment, etc. ..) (i.e. not all process code and data!). Once the OOM state is cleared, the "Resurrector" can go through the list and "resurrect" some processes.

From what I'm building so far, there seems to be no functionality similar to what I ask.

+5
source share
2 answers

No. When a process is killed by OOM Killer, it is dead. You can restart it (by allowing resources), and if this is something that is managed by the system (possibly via inittab), it can be restarted in this way.

Edit: As a thought experiment, think about what a process resurrection would mean. Even if you can save the entire state of the process, you will not want to, because a killed process can be REASON for a low memory state.

, , , ( ..). , -, , !

, , , . , ? , ? , tty, ( sshd )?

ENORMOUS , . - , : .

, , , ( swap), , . .

: , OOM. , .

+5

, . , , ?: -)

, OOM all, , . " resurrector" "" , , - , "". , , .

, " ", , swap memory - . , ulimit ps program /proc . " OOM" - .

, ulimit (, , , OOM atm)

#!/bin/bash
save_something=$ENV_VARIABLE
( ulimit -Sv 1000000; 
   perl -e 'print "Taking all RAM!!!\n"; while (1) { $a[$i++] = $i; }'
)
echo "killed, resetting"
( ulimit -Sv 1000000;
   export ENV_VARIABLE="$save_something"
   perl -e 'print "Taking all RAM!!!\n"; while (1) { $a[$i++] = $i; }'
)
+3

All Articles