From owner-freebsd-hackers Thu Jan 30 21:52:41 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id VAA03939 for hackers-outgoing; Thu, 30 Jan 1997 21:52:41 -0800 (PST) Received: from ki1.chemie.fu-berlin.de (ki1.Chemie.FU-Berlin.DE [160.45.24.21]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id VAA03934 for ; Thu, 30 Jan 1997 21:52:39 -0800 (PST) Received: by ki1.chemie.fu-berlin.de (Smail3.1.28.1) from mail.hanse.de (193.174.9.9) with smtp id ; Fri, 31 Jan 97 06:52 MET Received: from wavehh.UUCP by mail.hanse.de with UUCP for freebsd-hackers@FreeBSD.ORG id ; Fri, 31 Jan 97 06:52 MET Received: by wavehh.hanse.de (4.1/SMI-4.1) id AA28758; Fri, 31 Jan 97 03:38:07 +0100 From: cracauer@wavehh.hanse.de (Martin Cracauer) Message-Id: <9701310238.AA28758@wavehh.hanse.de> Subject: Re: Using rfork() / threads To: terry@lambert.org (Terry Lambert) Date: Fri, 31 Jan 1997 03:38:06 +0100 (MET) Cc: cracauer@wavehh.hanse.de, rminnich@Sarnoff.COM, freebsd-hackers@FreeBSD.ORG In-Reply-To: <199701302345.QAA00636@phaeton.artisoft.com> from "Terry Lambert" at Jan 30, 97 04:45:10 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text 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. Sure, so much is clear. But the original comment quoted topmost sounded like there are two sperate concepts called "VM address speace sharing" and "shared data areas", which is the same thing for me. Maybe one the these terms implies that one of them has resources like the descriptor table on board and the other not, but then I never heard of this term usage. Hence my question. Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://cracauer.cons.org Fax +49 40 522 85 36