[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: A fork Bomb - A deadlock ??



Hi,

A fork bomb is not a deadlock.
The kernel has a strategy for dealing with forks: It lowers the priority
of the parent as well as the child process. Still, fork bombs create
processes exponentially, and the system load increases rapidly, making
the system verry slow. 

You can configure the max no. of processes per user in
/etc/security/limits.conf (Donno why it never worked for me though;) ...
any ideas?

DEALING WITH FORK BOMBS:

1) I had written a Fork Bomb Defuser kernel module. You can get it from:
http://www.rohit.cx/rexfbd.htm

2) If your kernel is configured with CONFIG_MAGIC_SYSRQ enabled, various
emergency functions are available via special <Alt><SysRq> key. Read 
file:/usr/src/linux/Documentation/sysrq.txt

Hope this helps,
Rohit

Dont try this at Home! [ echo "$0 & $0 &" > ...;chmod 777 ...;./... ]

"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 ??
> 
>         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
> system.
> 
> Any pointers in clarifications will be appreciated. I,am trying to get
> into concepts and practical implications and aplications all at the same
> time. ;)
> 
> Regards,
> 
> Siva

-- 
Old age is always fifteen years old than I am.
		-- B. Baruch
===========================================================
       R o h i t   R o m e h a r s h a n   S i n g h
                    http://www.rohit.cx
     WORK:rohitsingh@xxxxxxxxxxxxxxx PLAY:rohit@xxxxxxxx