Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* OMAGIC vs. NMAGIC formats
@ 1995-07-18  4:00 Jonathan Litt
  1995-07-18  4:00 ` Ron Natalie
  0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Litt @ 1995-07-18  4:00 UTC (permalink / raw)



Hello,

The man page for the Ultrix provided ld(1) discusses the difference
between OMAGIC binaries (with writable, non-sharable text sections)
and NMAGIC binaries (with read-only, sharable text sections). It also
discusses ZMAGIC files, which it doesn't really explain. I have a
few questions concerning these options:

* Which is the default?
* If an OMAGIC binary forks in Ultrix 4.2A, are the text pages shared
with parent process? Are the pages copy-on-write?

I'd like to know which format to choose that would save me the most
memory in a fork-on-connect network deamon. Thanks for any info.

-- 
Jonathan Litt
littlitt@mit.edu



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: OMAGIC vs. NMAGIC formats
  1995-07-18  4:00 OMAGIC vs. NMAGIC formats Jonathan Litt
@ 1995-07-18  4:00 ` Ron Natalie
  0 siblings, 0 replies; 2+ messages in thread
From: Ron Natalie @ 1995-07-18  4:00 UTC (permalink / raw)


Jonathan Litt (littlitt@ATHENA.MIT.EDU) wrote:

: Hello,

: The man page for the Ultrix provided ld(1) discusses the difference
: between OMAGIC binaries (with writable, non-sharable text sections)
: and NMAGIC binaries (with read-only, sharable text sections). It also
: discusses ZMAGIC files, which it doesn't really explain. I have a
: few questions concerning these options:

: * Which is the default?
: * If an OMAGIC binary forks in Ultrix 4.2A, are the text pages shared
: with parent process? Are the pages copy-on-write?

ZMAGIC I would suspect is the default. (demand loaded text segments)
the O and N modes are left over from the old PDP-11 days and never much
used on machines with paging.  The text pages in the read only versions
(N and O) were always shared.  In the OMAGIC cases they were never shared.

: I'd like to know which format to choose that would save me the most
: memory in a fork-on-connect network deamon. Thanks for any info.

Machines with smarter paging architectures and kernel developers do
fork of data segments with copy on write.  I know for sure that the
VAX's never did this and I doubt that spim boxes did either.  You
may want to look up the "vfork" routine which was the kludge to get
around copying large data segments when doing forks followed by
exec's.

-Ron



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1995-07-18  4:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-07-18  4:00 OMAGIC vs. NMAGIC formats Jonathan Litt
1995-07-18  4:00 ` Ron Natalie

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