[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: A fork Bomb - A deadlock ??
On Sun, Apr 02, 2000 at 12:51:52PM +0530, V. Siva Subramanian wrote:
> Hi There,
> This is my second mail .. some kind soul puh..leese reply ..Got a
> query here !! Is a fork Bomb, a Dead lock ?? If so, why isn't it
> detected and a preventive action is taken even before the deadlock
> occurs ??
Fork bomb and dead lock are pretty different, though one may lead to
another. The only thing common to them is lock up. Fork bomb essentially
is a denial of service attack. A dead lock can occur even when there
are plenty of resources available. Any OS text book should explain to
you what a dead lock is.
That said, a low resource situation forced by a fork bomb could expose
dead locks in the code.
> What is the strategy that is used in dealing with deadlocks in Linux ??
> Is it the Ostrich Algorithm ?? because a fork bomb simply hung my
Solaris uses the Ostrich Algorithm, basically relying on the system admin
to set ulimits properly on normal users to prevent them from running
fork bombs. I've seen pissing contests in the past about why OS A is better
than OS B, because one doesn't have a kernel mechanism to deal with it.
However, the main trick used for dealing with these low memory, low
resource situations is to keep a small reserved pool available to
the kernel or a privileged user to deal with the situation. All reasonable
OSes do this.