Installation guide
only once on the disk. By contrast, if you link each process statically
with a set of library routines, the image of the library routines occurs
five separate times on the disk.
• System memory savings
When multiple processes run applications that are linked with a shared
library, you save physical memory. As with disk space, you see the
memory savings when multiple applications use the same shared
library.
• Reduced paging
Like other routines, a shared library routine is read into memory the
first time a process needs it. Because more than one process can use the
image of the shared library routine, the second process that calls it
might find the routine already in memory. If several processes are using
the same routine, that routine tends to remain in memory. Thus,
processes that use shared libraries often require less paging than
processes that use archive libraries.
• Better application and system performance
Using shared libraries improves the performance of your application
when multiple applications use the same shared library routines. This
situation often occurs on a typical multiuser system when multiple
applications are using shared libraries. In addition to improving the
performance of individual applications, this situation improves the
overall performance of your system.
However, benchmark applications linked with shared libraries might
show a degradation in performance when compared to the same
application linked with archive libraries. Benchmark applications
normally run on an unloaded system, so your benchmark loses the
opportunity to benefit from sharing library routines with other
applications. In addition, on an unloaded system, the startup time for
an application linked with shared libraries is somewhat slower than the
startup time for an application linked with archive libraries. Run-time
performance of your benchmark might be slower because references to
symbols exported from a shared library are made indirectly. References
to symbols in an archive library are made directly. Indirect references
are somewhat slower than direct references.
6.6.2 Changing from Archive Libraries to Shared Libraries
Normally, you can use shared libraries in any application and create any
library as a shared library. In most cases, the effect of using shared
libraries instead of archive libraries should be transparent; however, a few
6–14 Overview of the DIGITAL UNIX Programming Environment