18271Re: [redhat] Something fun to do, but not on a production system...
- May 1, 2008On Thu, 1 May 2008 16:39:26 -0400
Scott <scottro@...> wrote:
> On Thu, May 01, 2008 at 08:50:41PM +0100, ed wrote:Unfortunately I don't - I've changed jobs and we use SunOS/Linux so I
> > fork() is an expensive operation. vfork was introduced to be a
> > lighter version of the operation. In the majority of cases after
> > fork() comes exec*(). So vfork creates a new process (IIRC) within
> > the same process group and session but does not copy the memory
> > foot print.
> > The fork bomb DOES copy the memory foot print, so it has to take all
> > that the parent has. I assume this is where things get ugly.
> Ed, do you have a BSD box where you can try it? I'm wondering if it
> will have the same effect. I'll give it a try on a FreeBSD box
had to run it here.
If there's a difference it might be due to the Linux kernel's COW fork
(copy memory foot print when used) rather than copying the whole lot it
just does virtually the same as vfork until the child process reads
something that the parent would have given it, such as a file
Most fork operations benefit from COW, since most commonly the next
thing after fork is exec().
I think BSD introduced vfork, or was it SCO/SUN, I really can't
The Ether to Dantooine is taking hits because of a crappy FE1 & CE2
engine. Barbarella is blasting through 30 million dollars.
:: http://www.s5h.net/ :: http://www.s5h.net/gpg.html
[Non-text portions of this message have been removed]
- << Previous post in topic Next post in topic >>