On 4/18/06, Roman Shaposhnick <[EMAIL PROTECTED]> wrote:
> On Tue, Apr 18, 2006 at 12:22:30PM -0700, David Leimbach wrote:
> > On 4/18/06, Charles Forsyth <[EMAIL PROTECTED]> wrote:
> > The interesting thing is that Plan 9's great namespace manipulation
> > functionality + the fact that each process can have a private
> > namespace means that Plan 9 probably has the best shot at dealing with
> > "DLL-hell", like when 10 programs need 10 different versions of the
> > same shared library to run respectively.  A simple script wrapped
> > around the loading of a program can set up a namespace such that
> > ambiguities don't exist.
>
>   And you would have to go through all of the aforementioned troubles
>   to achieve exactly what ? What is it, that shared libraries are good
>   at ?

#1 Maintenance - If you have 50 programs that depend on one library
and you have a fix for the library how many things do you want to
"remember to build"?  (though people are throwing up straw man
arguments for this too.  I suspect the worst case scenario is not
always the common case though.)

#2 Supposed physical memory savings - libSystem on Mac OS X only
exists in memory 1 time for all the programs that use it... sorta. 
Read Only pages are shared, writable pages are COW and yes, this adds
a good deal of complexity to the VM of the OS to have this.

We can stand up and push down arguments all day.  At the end it's up
to someone to decide if they're worth the trouble.  It seems that I'm
alone in my thinking that they might be of some use :-).

I'm actually more concerned with #1 overall.  If #2 is a real issue
then there may be something else wrong with the system, though I'd be
kind of interested to see what the real performance gains of shared
library systems are vs static library systems... I suspect this
measurement hasn't really been done adequately.  Then again, if it's
not a real problem, no sense trying to fix it either.

As for #1, I suppose that can be handled through a well constructed
build system also without making the kernel bend in knots to support
shared libs and mmap'ing and sharing pages or not.

I'm actually not really convinced myself that shared libs are good...
I prefer to remain somewhat agnostic on the topic.  I've not heard
particularly convincing arguments in favor of them and the best and
most reasonable argument not to have them is increased complexity.

Dave

Reply via email to