Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Jan 1997 18:01:25 -0800 (PST)
From:      Archie Cobbs <archie@whistle.com>
To:        terry@lambert.org (Terry Lambert)
Cc:        cracauer@wavehh.hanse.de, rminnich@Sarnoff.COM, freebsd-hackers@freebsd.org
Subject:   Re: Using rfork() / threads
Message-ID:  <199701310201.SAA00278@bubba.whistle.com>
In-Reply-To: <199701302345.QAA00636@phaeton.artisoft.com> from Terry Lambert at "Jan 30, 97 04:45:10 pm"

next in thread | previous in thread | raw e-mail | index | archive | help

> > >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



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