Shared Lib Question (ISC)

Frank Mayhar fmayhar at hermes.ladc.bull.com
Thu May 16 10:26:17 AEST 1991


In article <184 at titccy.cc.titech.ac.jp>, mohta at necom830.cc.titech.ac.jp (Masataka Ohta) writes:
-> In article <7762 at auspex.auspex.com>
-> 	guy at auspex.auspex.com (Guy Harris) writes:
-> >Irrelevant.  I said that different OSes provide various functions in
-> >different fashions, which means that the fact that different OSes
-> >implement shared libraries isn't any sort of valid argument against
-> >shared libraries; your statement doesn't have any relevance to that.
-> The problem is that NO OS support shared libraries right, perhaps because
-> there is no way to do so.

Again I ask, what do you consider a "right" way to implement them?  As opposed
to what you consider a "wrong" way.  Ignore existing implementations.  I mean,
in the best of all possible worlds, how should shared libraries be implemented.
(And don't say that in the best of all possible worlds, shared libraries
wouldn't exist.  See the last paragraph, below.)

-> >>Moreover, there seems to be no right implementation of shared libraries, so
-> >>far.
-> >OK, so what would you consider a "right" implementation of them?  
-> Do you consider there is a "right" one?

It really sounds like you're saying here that you don't like shared libraries
because none are done "right" and that none are done "right" because none are
done "right."

I _do_ consider that there are "right" ways to implement shared libraries, in
that there are effective, relatively efficient ways as opposed to ineffective,
relatively inefficient ways.  There is probably more than one "right" way, in
fact.  There may actually not be any "right" implementations extant at the
moment (this is debatable), but that's not the point.

-> >What
-> >don't you like about, say, Multics's implementation, or VMS's, or
-> >Aegis's, or SunOS 4.x/S5R4's, or OSF/1's, or....?
-> Indirect jumps and accompanied process private data for the jump table.

So what would be a better way to do it?

Really, there's a tradeoff between the utility of shared libraries and
efficiency.  This is the way operating systems work, unfortunately.  Odds
are, using a shared library will always be (perhaps only slightly) less
efficient that using unshared libraries, in terms of execution speed.  In
other terms, such as ease of maintenance or disk or memory usage (given
that shared libraries' instruction space is sharable) it can be much
more efficient.  This is the tradeoff.  And, certainly, not all applications
are suited to the use of shared libraries.  But that doesn't mean that _no_
application should use them.
-- 
Frank Mayhar  fmayhar at hermes.ladc.bull.com (..!{uunet,hacgate}!ladcgw!fmayhar)
              Bull HN Information Systems Inc.  Los Angeles Development Center
              5250 W. Century Blvd., LA, CA  90045    Phone:  (213) 216-6241



More information about the Comp.unix.internals mailing list