Shared Libraries: Unique to Suns??

DaviD W. Sanderson dws at margay.cs.wisc.edu
Mon Mar 25 13:57:10 AEST 1991


myamin at cbnewsm.att.com (m.yamin) writes:
>In fact, the UnixPC may have had the first released UNIX implementation
>of shared libraries.
>				M. Yamin  my at syscad.att.com

As far as I know, static shared libraries (as opposed to the dynamic
shared libraries in SVR4 and SunOS) were introduced with the UNIX-PC
to make UNIX workable (as opposed to possible) on the machine.
There are two relevant useful properties of static shared libraries
(and dynamic shared libraries, for that matter).

1.  Executables linked with a static shared library occupy less disk
space than executables linked with the corresponding ordinary
archive library.

2.  The text of a static shared library is present in memory at most
once.  Thus executables need less physical memory to run, provided
there is at least one other executable using the same library already
running.

The UNIX-PC had relatively little disk and memory, so for performance
(and space) reasons static shared libraries were introduced.  Most of
the noncritical OS programs were linked with the shared libc; this
significantly reduced the overall disk space requirements (I don't
remember how much).

One advantage of static shared libraries over dynamic shared libraries
is that programs using them start more quickly (no "runtime linking"
overhead).  The BIG disadvantage relative to dynamic shared libraries
is that source code maintenance is a headache if you want to create
a new version of the library that can be installed and used by
programs already linked with an older version of the library.
(e.g. creating a new /shlib/libc_s to be installed somewhere WITHOUT
having to relink all the programs that use it.)

In terms of flexibility and ease of source maintenance (e.g.
maintaining one set of source for both the archive and the shared
versions of a library), dynamic shared libraries are far superior to
static shared libraries.

Disclaimer:	I worked on shared libraries when I was at AT&T.
-- 
       ___
      / __\  U N S H I N E	           DaviD W. Sanderson
     |  |  | I N E			    dws at cs.wisc.edu
_____|  |  |_____  ________
\      / \   |__/ /////__	Fusion Powered Locomotives Made to Order
 \____/   \__|_/  \\\\\______	 (TARDIS model available at extra cost)



More information about the Comp.sys.3b1 mailing list