I am running several programs on my computer and under normal circumstances my RAM (2GB) and CPU power is sufficient. However it occurs that a single program suddenly turns the system permanently completely unresponsive (no alt+f1, no reisub) and I need to do a hard shut-down and loose data. I want to be secured against such a situation.
Preferably the system would be able to keep itself alive so that the user has control to close programs at any time (I remember in Ubuntu 9.10, the kernel killed processes that require too much RAM).
How can I set it up to allow no program to require more than ~75% of memory?
ulimit -v 1500000 but it seemed not to help (maybe not persistent?) and I lost data again.