Use of n option for ld(1)

John Weald jgw at ptsfc.UUCP
Sat Oct 25 08:29:06 AEST 1986


[]

I have some questions about the -n flag for ld(1) and its use on SV and 4.2.

In the days of programming on the PDP and AP16 (don't ask), under AT&T UNIX
3.0 the -n flag would give you shared text and separate I&D (as per the
manual page for ld(1) - PDP-11 only). Great for 16 bit machines.

On moving to SV on VAX's + 3b product line the -n flag is ignored. You get
shared text by default. 64K for text and data is no longer a problem on 32 bit
machines.

Neither of the above is a demand paging system. Under SVR2 (paging) and
4.2 we have demand paging within which text pages are shared among all those
that need them(?).

In the 4.2 manual for ld(1) it still says that -n gives you shared text. It
would seem to me that this is not so. Without the source on our machine
(CCI 6/32) and decent documentation (-: I am left to play and speculate, so
forgive me if I am barking up the wrong tree. Am I right is assuming that
the -n flag (magic # 0410) gives you a process that is not paged from
the i-node? It must be "faulted" in, thus causing the possibility
of pages being swapped out before being executed in an attempt to read the
whole process into memory and a larger initial resident set size?

If the above paragraph is true why would one want to load with the -n?
I can see it if you know that your process is small or is going to
do abnormal behavior unsuitable for paging from the i-node (what did
happen to vadvise (-: ). Why else would you use it?

If the paragraph is not true then that has widdled on my bonfire!

Come to think of it while I have your attention what is the difference between
4.2 paging and SRV2 paging apart from vfork?

Does the -n flag do anything else on other flavors of UNIX? 

John Weald

{ihnp4, pyramid}!ptsfa!ptsfc!jgw



More information about the Comp.unix mailing list