From: pmacdona@sanjuan (Peter MacDonald)
Subject: swapping to death
Date: Wed, 10 Feb 93 04:05:05 GMT

I am a little peturbed at the fact that running a memory hog
rogue process under X11 in Linux results in a basically hung
machine.  

The problem is that the X server is relied upon entirely to 
process our keystrokes, but when largely swapped out, it
basically can not respond to anything, even ctl-alt-backspace.

It seems to me that this is one of the last major blemishes
on Linux, and given the talent of the people in this group
should not be insoluble.

One solution could be to modify the X server so that it can
receive a top priority signal from the kernel to kill it.
But this is a little extreme.

Perhaps the swapping algorithm could be changed to behave differently
when swap is more than 95% exhasted.  Maybe something like:
suspend the first process requesting a new data page, and release all 
of it's clean pages.  Don't allow the process to continue for 5 
minutes.

If you get the wrong process the first time, you should get it
next time, because it will immediately eat up the swap so that
we are at 95% again, in which case, maybe we could release the
currently suspended one (but maybe not!).


Disclaimer:  I know very little about scheduling algorithms.
So anyone got any ideas?

Peter