Shared Lib Question (ISC)

Barry Margolin barmar at think.com
Thu May 16 18:10:03 AEST 1991


In article <RANG.91May15231758 at nexus.cs.wisc.edu> rang at cs.wisc.edu (Anton Rang) writes:
>  I'm not familiar enough with OSes running on segmented architectures
>to be sure if there are any that use this approach, but I seem to
>recall that MULTICS did, and that the cost to call a shared library
>routine was higher on the *first* call from a particular point but
>that the code was then patched to jump directly to the routine.
>(Which presumably defeated code sharing?  I'll shut up now because I'm
>not really sure and can't find my MULTICS papers.)

No, Multics (capital M, small rest) doesn't patch the text segment -- it is
almost always sharable.  Multics uses indirection through the static data
segment for dynamic linking.  It's the entry in this segment that is
patched the first time the routine is called, so future calls to the
routine are non-trapping indirect calls.  The first call is more expensive
simply because that is when the routine is linked.


-- 
Barry Margolin, Thinking Machines Corp.

barmar at think.com
{uunet,harvard}!think!barmar



More information about the Comp.unix.internals mailing list