[comp.unix.questions] Sharable executables -- ambiguous documentation

bob@acornrc.UUCP (Bob Weissman) (01/13/88)

I'm on a Vax running 4.2bsd.

The man page for ld(1) indicates that the default for executable images is
for them to be demand paged, as if the -z flag had been specified.  The
documentation of the -n flag indicates that it proeuces sharable, preloaded
executables.

But the man page for chmod(2), in its brief discussion of the sticky bit
(mode 01000), says that the default is for executables to be sharable.

Who's right here?

I guess what I'm really asking is:

Will my system's performance improve if I relink the most heavily used
programs, like sh, csh, vi, and emacs, with the -n switch?  (And if so,
why do the Berkeley-supplied Makefiles not specify -n to the liker?)

-- 
Bob Weissman
Internet:	bob@acornrc.UUCP
UUCP:		...!{ ames | decwrl | oliveb | apple }!acornrc!bob
Arpanet:	bob%acornrc.UUCP@AMES.ARPA

bob@acornrc.UUCP (Bob Weissman) (01/13/88)

I'm on a Vax running 4.2bsd.

The man page for ld(1) indicates that the default for executable images is
for them to be demand paged, as if the -z flag had been specified.  The
documentation of the -n flag indicates that it produces sharable, preloaded
executables.

But the man page for chmod(2), in its brief discussion of the sticky bit
(mode 01000), says that the default is for executables to be sharable.

Who's right here?

I guess what I'm really asking is:

Will my system's performance improve if I relink the most heavily used
programs, like sh, csh, and emacs, with the -n switch?  (And if so,
why do the Berkeley-supplied Makefiles not specify -n to the linker?)

-- 
Bob Weissman
Internet:	bob@acornrc.UUCP
UUCP:		...!{ ames | decwrl | oliveb | apple }!acornrc!bob
Arpanet:	bob%acornrc.UUCP@AMES.ARPA

chris@mimsy.UUCP (Chris Torek) (01/13/88)

In article <561@acornrc.UUCP> bob@acornrc.UUCP (Bob Weissman) writes:
>Vax running 4.2bsd.

(4.2!?)

>ld(1) indicates that the default ... is ... as if the -z flag had
>been specified ... [and that] -n ... produces sharable, preloaded
>executables.

All true.

>But the man page for chmod(2), in its brief discussion of the sticky bit
>(mode 01000), says that the default is for executables to be sharable.

Also true.

Somewhere, if you look hard enough (possibly including at the source
code for the kernel), you can find that `-z' creates a demand loaded
shared text image that is run by paging in the first few pages,
then paging in the rest of the pages on demand, while `-n' produces
a shared text image that run by loading the entire image, then paging
in only pages that are later paged out.  Hence `preloaded' means only
that when run, the entire text image is read.

>Will my system's performance improve if I relink the most heavily used
>programs, like sh, csh, vi, and emacs, with the -n switch?

Probably not, but all depends on your configuration.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris@mimsy.umd.edu	Path:	uunet!mimsy!chris