Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Re: Do multiple processes running same program share memory?
       [not found] <31223D7B.4C09@pweh.utc.com>
@ 1996-02-16  5:00 ` Paul Henderson
  0 siblings, 0 replies; only message in thread
From: Paul Henderson @ 1996-02-16  5:00 UTC (permalink / raw)


Pete Bradley (bradlepc@pweh.utc.com) wrote:
: If I have multiple processes running the same program
: on a single alpha running OSF (Er...Digital Unix ;-),
: will the text of the program be shared in memory? 

: The program in question has 5 Mb of text and will be
: running on a 4-CPU Sable.

:                       Pete Bradley
:                       Pratt & Whitney


I asked our technical director who is a kernel whiz, and he said:

Yes, the code sections and any shared library code sections will only
physically exist once, all applications will map in those physical
pages.  For data sections, they are loaded "virgin" from the disk and as
long as they haven't been modified, all applications share a "read only"
copy of the pages, once an application tries to do something (like x++)
a page fault occurs and a separate physical copy of the page is made for
the process doing the write.  This is typically done on a page-by-page
basis. So, if you run a HUGE program with HUGE data multiple times you
only take the hit for it once until each program starts writing its own
data then it starts splitting off till there are two complete copies
(still share the code segments).




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-02-16  5:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <31223D7B.4C09@pweh.utc.com>
1996-02-16  5:00 ` Do multiple processes running same program share memory? Paul Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox