Re: top delay value
- From: "Coleman Kane" <zombyfork@xxxxxxxxx>
- Date: Wed, 31 Jan 2007 14:30:05 -0700
On 1/31/07, Mike Meyer <mwm-keyword-freebsdhackers2.e313df@xxxxxxxxx> wrote:
In <20070131170241.230960@xxxxxxx>, Dr. Markus Waldeck <waldeck@xxxxxx>
typed:
> > > > typing "while :; do :; done". There are a thousand ways
>
> > No. What I write above is not a "fork bomb", it's a single
> > process which is wasting CPU in a busy loop. It's exactly
> > equivalent to top(1) with zero delay, except that top
> > produces some output, while a busy loop does nothing useful
> > at all.
>
> I tested different shells and I found out that an exlicit sub shell
> is required to let the shell fork:
>
> while :; do (:); done
That's still not a fork bomb. While it creates a process every time
through the loop, the process exits before the loop continues, so
you've still got just a few processes. Basicaly, it's still a busy
loop.
A true fork bomb creates an ever-increasing number of processes,
typically by forking copies of itself (which led to them being called
"rabbit jobs" when I first ran into one).
<mike
--
Mike Meyer <mwm@xxxxxxxxx>
http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.
Don't forget that a real fork bomb would fork forking forkers thereby
growing the process overhead and time exponentially!
e.g:
perl -e 'while(1) { fork; };'
--
Coleman Kane
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"
- References:
- Re: top delay value
- From: Oliver Fromme
- Re: top delay value
- From: Dr. Markus Waldeck
- Re: top delay value
- From: Mike Meyer
- Re: top delay value
- Prev by Date: Re: a question regarding <sys/shm.h>
- Previous by thread: Re: top delay value
- Next by thread: Re: top delay value
- Index(es):
Relevant Pages
- Re: top delay value
... process which is wasting CPU in a busy loop. ... I tested different shells
and I found out that an exlicit sub shell ... That's still not a fork bomb. ...
(freebsd-hackers) - Re: heat, idle, and busy loop
... >with the system's idle process? ... >power saving mode that can be used
in the idle loop to sleep the processor ... The 'HLT' machine instruction goes back
at least as far as the 8086 from ... it's not "running in place" like your busy loop -
it has ... (comp.os.linux.hardware) - Re: help
... Even on a single-user system (say, a PC running Windows or Linux), a ... busy
loop will consume CPU resources that could otherwise be used by ... (comp.lang.c) - Re: Display driver in WinCE 5.0
... You may use a H/W Counter and loop until 10ms. ... or use a busy loop
to loop some period. ... the codes works in WinCE 4.2. ... (microsoft.public.windowsce.platbuilder) - Re: Unix-ify File Names
... special characters do make it more difficult to handle arbitrary file ... At
least in POSIX shell. ... it's old value inside of the loop. ... (Debian-User)