From owner-freebsd-hackers Thu Jan 30 18:02:20 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id SAA21277 for hackers-outgoing; Thu, 30 Jan 1997 18:02:20 -0800 (PST) Received: from whistle.com (s205m131.whistle.com [207.76.205.131]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id SAA21272 for ; Thu, 30 Jan 1997 18:02:17 -0800 (PST) Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id SAA02696; Thu, 30 Jan 1997 18:01:46 -0800 (PST) Received: from bubba.whistle.com(207.76.205.7) by whistle.com via smap (V1.3) id sma002692; Thu Jan 30 18:01:25 1997 Received: (from archie@localhost) by bubba.whistle.com (8.7.5/8.6.12) id SAA00278; Thu, 30 Jan 1997 18:01:25 -0800 (PST) From: Archie Cobbs Message-Id: <199701310201.SAA00278@bubba.whistle.com> Subject: Re: Using rfork() / threads In-Reply-To: <199701302345.QAA00636@phaeton.artisoft.com> from Terry Lambert at "Jan 30, 97 04:45:10 pm" To: terry@lambert.org (Terry Lambert) Date: Thu, 30 Jan 1997 18:01:25 -0800 (PST) Cc: cracauer@wavehh.hanse.de, rminnich@Sarnoff.COM, freebsd-hackers@freebsd.org X-Mailer: ELM [version 2.4ME+ PL25 (25)] 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. What about the heap... is it shared? What about shared libraries? I assume stack regions are not shared... -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com