Subject: Re: Fork bomb protection patch
To: Havard Eidnes <he@netbsd.org>
From: Jaromir Dolecek <jdolecek@netbsd.org>
List: tech-kern
Date: 12/05/2002 12:29:34
Havard Eidnes wrote:
> > If consensus is to penalise the offending process, I'd like to put
> > forward the notion of just adding a large number to p_estcpu rather
> > than tsleeping.  At least then the solution would work within the
> > current scheduler to some degree.
> 
> Wouldn't that make some of the statistics shown by e.g. ps misleading?

This is indeed the case. ps/top would display unreal CPU usage for
the processes (and I belive also bogus (>100%) total CPU usage).
There doesn't seem to be a way to give process temporal scheduling
penalty ('nice' value sticks). So, I think the induced sleep there
is better than messing with scheduler guts.

Jaromir
-- 
Jaromir Dolecek <jdolecek@NetBSD.org>            http://www.NetBSD.org/
-=- We should be mindful of the potential goal, but as the tantric    -=-
-=- Buddhist masters say, ``You may notice during meditation that you -=-
-=- sometimes levitate or glow.   Do not let this distract you.''     -=-