First of all, let me say I personally am not interested in preventing
malicious processes from being able to perform DOS attacks; I personally
am interested in making sure the system survives common non-malicious
failure modes. Unfortunately, it isn't hard for a non-malicious process
to cause rather severe problems under the current scenario.
However, I do have two comments with regard to your suggestion:
(1) It basically comes down to the idea of one process whose job it is to
always create a process that is the most attractive one to be killed,
regardless of what the heuristic is. I think one can prove one cannot
defend against this as long as the process in question can spawn processes
fast enough.
(2) despite the inclusion of the fact that K grows slowly, K *does* have a
higher score than processes that have been around longer than K, based
on the fact that it has a shorter time and a larger memory usage.
So step 4 is actually irrelevant; if K does in fact grow to the point
to where it is itself a memory hog, it will be high on the target list,
and assuming the "queue" isn't blocked by quickly spawning [a] processes,
it will get killed soon. (note that [a] processes need to be spawned
*and* have time to grow to a point where their score surpasses K's score;
this takes a bit of CPU time when K is large)
The reason for this is that the "ratio" method has the "most memory" solution
and "most recent" solutions as limiting cases. Among processes that have been
around for approximately the same amount of time, the largest is killed; among
processes that use approximately the same amount of time, the newest one is
killed.
---------------------------------------------------------------------------
Tim Hollebeek | Disclaimer :=> Everything above is a true statement,
Electron Psychologist | for sufficiently false values of true.
Princeton University | email: tim@wfn-shop.princeton.edu
----------------------| http://wfn-shop.princeton.edu/~tim (NEW! IMPROVED!)