Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Nov 2000 23:44:02 -0500
From:      "Kurt J. Lidl" <lidl@pix.net>
To:        Pedro F Giffuni <pfg1+@pitt.edu>, Tony Finch <dot@dotat.at>
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: sfork() ??
Message-ID:  <20001121234402.C18090@pix.net>
In-Reply-To: <Pine.GSO.3.96L.1001121201011.27588A-100000@unixs1.cis.pitt.edu>; from Pedro F Giffuni on Tue, Nov 21, 2000 at 08:27:06PM -0500
References:  <20001122004551.A50272@hand.dotat.at> <Pine.GSO.3.96L.1001121201011.27588A-100000@unixs1.cis.pitt.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Nov 21, 2000 at 08:27:06PM -0500, Pedro F Giffuni wrote:
> rfork comes from plan 9 and along with sfork it wasn't part of the
> 4.4BSDlite 2 release, OTOH if both are the same, why aren't we referencing
> it in our syscalls for compatibility with BSDI ?
> 
> I can't find a reference to sfork elsewhere, but anyone with BSD/OS 2.x
> or later should know for sure.

sfork(), in the not-quite-released BSD/OS 4.2 has gotten an overhaul,
to the point where fork() and vfork() are just sfork() wrappers.  I've
heard the comment before that sfork() is just the BSD way of pronouncing
rfork()!

So in the 4.2 release, BSD/OS will finally have a fully variable
weight fork() call, which would be suitable for implementing all
sorts of lightweight processes, threads and so forth.

For those unfamiliar with variable weight fork semantics, bastically,
you get to specify which parts of the process space you want to share
and which parts you want to have a new version of in the child process.
So, you can trivially share data, memory, etc...  (Stack, of course,
cannot be shared :-)

The linux clone() call is something similar to sfork()/vfork().
It has some extra grot pasted onto the side to allow for pid hiding,
for the wretched hack of a way to do pthreads support there.

Chris Torek has described this in amazing detail in the past, while
answering a different question.  Look for the message with the
Subject line "why fork?" in the following digest message:

http://faqchest.dynhost.com/prgm/perlu-l/perl-99/perl-9906/perl-990602/perl99061420_14433.html

-Kurt


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001121234402.C18090>