Shared libraries (was Re: Window system bashing (was Re: X11 bashing))

Masataka Ohta mohta at necom830.cc.titech.ac.jp
Wed Apr 17 17:49:04 AEST 1991


In article <1991Apr17.020930.25198 at NCoast.ORG>
	allbery at ncoast.ORG (Brandon S. Allbery KB8JRR/AA) writes:

>| Shared library is NO solution. It only moves complexity, unstability
>| and ineffeciency of X to UNIX.

>With that argument, I bet you'd love to still be using v6 Unix....

If something is useful and implemented relatively cleanly, like networking
of 4.2BSD, it is OK to expand UNIX.

>Shared libraries *do* have a place in standard Unix.  And not just for
>gigabyte GUIs... the standard C library is a shared library in V.3, which cuts
>the size of the system down by quite a bit.  I assume this has been continued
>into V.4.

Then, let's face the reality.

On a old 4.2BSD+NFS3.2 workstation (SONY NWS830, 68020) having 180MB of
default disk drive capacity,

	% du -s /bin /usr/bin /usr/ucb /etc /usr/etc
	1773	/bin
	2601	/usr/bin
	6804	/usr/ucb
	1998	/etc
	2279	/usr/etc

The amount of disk space consumed by commands is only 15455 KB.

On a 4.3BSD+NFS4.0 workstation (SONY NWS3860, R3000) having 600MB of
default disk drive capacity,

	% du -s /bin /usr/ucb /etc /usr/etc /usr/bin /usr/bin/X11
	1	/bin
	5265	/usr/ucb
	1098	/etc
	10648	/usr/etc
	44193	/usr/bin
	36321	/usr/bin/X11

The amount of disk space consuumed by commands excluding X11 is still
only 24884 KB.

You may claim shared libraries reduces the amount of required memory.
But, even if you run all the command at the same time, total code
space consumed is only 24884KB (including non-library code). On the
other hand, if you run single X11 application, with shared library,
mere /lib/X11.a consumes 3.3MB of virtual (and often real, as libraries
tends to be scattered) memory.

So, just throw away huge window systems and forget about shared libraries.

					Masataka Ohta



More information about the Comp.unix.wizards mailing list