From owner-freebsd-hackers Thu Jan 30 15:46:15 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id PAA11160 for hackers-outgoing; Thu, 30 Jan 1997 15:46:15 -0800 (PST) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id PAA11152 for ; Thu, 30 Jan 1997 15:46:10 -0800 (PST) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id QAA00636; Thu, 30 Jan 1997 16:45:10 -0700 From: Terry Lambert Message-Id: <199701302345.QAA00636@phaeton.artisoft.com> Subject: Re: Using rfork() / threads To: cracauer@wavehh.hanse.de Date: Thu, 30 Jan 1997 16:45:10 -0700 (MST) Cc: rminnich@Sarnoff.COM, freebsd-hackers@FreeBSD.ORG In-Reply-To: <9701301753.AA23376@wavehh.hanse.de> from "Martin Cracauer" at Jan 30, 97 06:53:18 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > >VM space handling is a little different. If you request VM space sharing, > >you don't exactly get Vm address space sharing: what you get is instead > >shared data areas where in normal fork they are copied. More details on > >request. The effect is what you want, though: shared data areas. > > Could you explain a bit more. What exactly is the difference between > VM space sharing and shared data areas from the process' and the > kernel perspective? The per process open file table points to the same location, for one (that's actually a biggie). If I open a file in one process, it is open for both processes. If I close it, it's closed. There is one fd offset associated with the object -- if one process writes it, the offset is advanced, and if the other writes it, it's advanced again. There is a potential race as to who gets to do the write. Etc. Regards, Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.