Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!sri-spam!sri-unix!hplabs!pyramid!decwrl!sun!guy From: guy@sun.uucp (Guy Harris) Newsgroups: net.unix Subject: Re: Use of n option for ld(1) Message-ID: <8543@sun.uucp> Date: Sun, 26-Oct-86 03:53:36 EST Article-I.D.: sun.8543 Posted: Sun Oct 26 03:53:36 1986 Date-Received: Mon, 27-Oct-86 01:42:35 EST References: <727@ptsfc.UUCP> Distribution: world Organization: Sun Microsystems, Inc. Lines: 37 > 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. Gee, the System III (i.e., 3.0.1) manual we have here says that "-i" gives you shared text and separate I&D; "-n" gives you shared text, but no separate I&D. > 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? "-n" gives you shared text on all versions of UNIX I know about. In 4.2, it gives you shared text that is not paged in from the i-node, i.e. it is NOT faulted in. "-z" gives you shared text that *is* paged in from the i-node, i.e. it is faulted in. If you meant to say "loaded in all at once" rather than "'faulted' in", you are correct, except that, as stated, even though something loaded with "-n" is not faulted in it still has shared text. > 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? You would use it if your process is small, as you stated. If you drag in 99% of the pages of a program early on, you're better off reading it in all at once because it takes longer to load it piecemeal by paging than by loading it all at once. -- Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com (or guy@sun.arpa)