9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Brantley Coile <brantley@coraid.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Install from CD fails
Date: Tue, 18 Apr 2006 19:19:08 -0400	[thread overview]
Message-ID: <8494fb45ef78b3566627c1425c5441b7@coraid.com> (raw)
In-Reply-To: <3e1162e60604181454l35bd6917v8a6169c6befd9baa@mail.gmail.com>

System designers have a responsibility to help the rest of the
system's community by providing a useable system.  I'll make the
following observations regarding shared libraries as if you and I were
debating putting shared libraries into a system.  I have worked both
sides of this issue, so I have an experienced opinion, not just apriori
idea of good system hygiene.

First, let me deal with your two `advantages.'

> #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.)

This has an ugly other side.  If I have 50 programs that depend on one
library and fix a bug in the library, I now have 50 live programs in
production that haven't been tested.  I don't know if my change has
broken something else and won't know until I re-test all 50 programs.
I now have to do all that testing at once.  With static libraries I
have the luxury of going thru the 50 programs one at a time and
relinking them with the new library or reverting to an old library if
there's a problem.
>
> #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.

Before X windows, 10% of programs were from the library.  With X
windows that number ballooned to 90%, so there is an apparent (see
below) space savings with X windows.  This is because when to touch
anything you get everything.  That, I would argue, is bad design.  (I
added shared library to a custom embedded Unix I did 15 years ago
because the application was also mis-designed.) The X library is
really a sub-system that should be somewhere other than the user's
program.


Also on the down side, shared libraries make it hard to distrubute
binaries without also sending out the library.  The binary, or even
the files in the same directory, are no longer all that is required to
run the program.  You also have to have the correct version of the
library.  Since you get different binaries that need different
versions of the library, you now wind up with three or six or more
slight variations of the same library, all get loaded into core.  Now,
where's my space saving?  Remove one and now you have a bunch of
programs that don't work, but you don't know it yet.

To load a binary that is linked to a library takes longer to load.


I have seen code sharing done right, such as Oberon, but every version
of shared libraries in Unix I've seen cost more than they were worth.
Including my own.

Hope the above arguments at least seem rational.  They are off the top
of my head.  I'm sure others on 9fans have other, better data points
that do the engineering calculation on the cost/benefits of shared
libraries.


 bc



  reply	other threads:[~2006-04-18 23:19 UTC|newest]

Thread overview: 121+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-17 22:07 Bakul Shah
2006-04-18  0:01 ` Russ Cox
2006-04-18 14:36   ` Gorka guardiola
2006-04-18 15:47     ` Russ Cox
2006-04-18 14:45       ` Ronald G Minnich
2006-04-18 16:12         ` Charles Forsyth
2006-04-18 16:42           ` andrey mirtchovski
2006-04-18 16:46           ` Bruce Ellis
2006-04-18 16:47             ` Charles Forsyth
2006-04-18 17:41               ` Brantley Coile
2006-04-18 17:46               ` David Leimbach
2006-04-18 17:55                 ` Bruce Ellis
2006-04-18 18:06                   ` Francisco J Ballesteros
2006-04-18 22:37                     ` Skip Tavakkolian
2006-04-18 18:54                   ` Charles Forsyth
2006-04-18 19:22                     ` David Leimbach
2006-04-18 20:14                       ` lucio
2006-04-18 20:34                       ` Russ Cox
2006-04-18 19:52                         ` David Leimbach
2006-04-20 21:16                         ` Latchesar Ionkov
2006-04-18 20:45                       ` Ronald G Minnich
2006-04-18 21:08                         ` David Leimbach
2006-04-18 21:39                       ` Roman Shaposhnick
2006-04-18 21:54                         ` David Leimbach
2006-04-18 23:19                           ` Brantley Coile [this message]
2006-04-19  1:05                             ` Roman Shaposhnick
2006-04-19 14:17                             ` David Leimbach
2006-04-19 14:31                               ` Charles Forsyth
2006-04-19 15:32                               ` Chad Dougherty
2006-04-19 15:45                                 ` David Leimbach
2006-04-19 15:57                                   ` Federico G. Benavento
2006-04-19 17:45                                     ` David Leimbach
2006-04-19 23:56                                       ` geoff
2006-04-19 16:49                                   ` Russ Cox
2006-04-19 17:50                                     ` David Leimbach
2006-04-19 17:55                                       ` Federico G. Benavento
2006-04-19 18:45                                       ` Charles Forsyth
2006-04-19 18:55                                         ` David Leimbach
2006-04-18 23:27                           ` Roman Shaposhnick
2006-04-18 23:29                           ` Federico G. Benavento
2006-04-18 23:48                             ` Lyndon Nerenberg
2006-04-19 14:25                             ` David Leimbach
2006-04-19 14:31                               ` Ronald G Minnich
2006-04-19 15:51                                 ` Tim Wiess
2006-04-19 19:53                                 ` Wes Kussmaul
2006-04-20 14:39                                   ` Ronald G Minnich
2006-04-20 15:50                                     ` Jack Johnson
2006-04-20 21:20                                       ` Ronald G Minnich
2006-04-20 21:42                                         ` Dan Cross
2006-04-20 22:06                                           ` Brantley Coile
2006-04-21  3:43                                           ` Ronald G Minnich
2006-04-21  4:37                                             ` Dan Cross
2006-04-21 16:08                                               ` Ronald G Minnich
2006-04-20 22:09                                         ` Wes Kussmaul
2006-04-20 23:09                                           ` Charles Forsyth
2006-04-21  3:45                                           ` Ronald G Minnich
2006-04-21  4:31                                             ` Dan Cross
2006-04-21 13:36                                               ` Christoph Lohmann
2006-04-21  4:46                                             ` lucio
2006-04-18 19:34                     ` jmk
2006-04-18 19:52                       ` David Leimbach
2006-04-18 20:34                     ` Roman Shaposhnick
2006-04-18 21:04                     ` Dan Cross
2006-04-18 21:11                       ` Charles Forsyth
2006-04-18 21:16                         ` Dan Cross
2006-04-18 21:21                         ` David Leimbach
2006-04-18 21:24                       ` David Leimbach
2006-04-19  2:53                         ` geoff
2006-04-19  3:16                           ` Dan Cross
2006-04-19  3:28                             ` geoff
2006-04-20 22:35                           ` Roman Shaposhnick
2006-04-19  3:02                         ` Dan Cross
2006-04-18 20:44                 ` Ronald G Minnich
2006-04-20  3:10                   ` LiteStar numnums
2006-04-18 16:48             ` Charles Forsyth
2006-04-18 16:58               ` Bruce Ellis
2006-04-18 17:02             ` uriel
2006-04-18 17:30               ` Bruce Ellis
2006-04-18 20:21           ` Richard Miller
2006-04-18 21:10             ` Charles Forsyth
2006-04-19  1:14             ` geoff
2006-04-19 12:49               ` Richard Miller
2006-04-19 13:21                 ` Charles Forsyth
2006-04-18 16:17       ` Dave Eckhardt
2006-04-18 19:17         ` Lyndon Nerenberg
2006-04-19  0:28   ` Bakul Shah
2006-04-19  1:45     ` Russ Cox
2006-04-19  2:35 erik quanstrom
2006-04-19  3:53 ` Russ Cox
2006-04-19 19:34 ` Roman Shaposhnick
2006-04-19 19:42   ` Bruce Ellis
2006-04-20  1:07     ` Roman Shaposhnick
2006-04-20  2:02       ` Jack Johnson
2006-04-19 19:45   ` Charles Forsyth
2006-04-19 21:16   ` Brantley Coile
2006-04-19 21:46   ` quanstro
2006-04-20  1:03     ` rog
2006-04-20  6:08       ` Charles Forsyth
2006-04-20 15:59         ` rog
2006-04-20  4:02     ` Roman Shaposhnick
2006-04-19  2:47 erik quanstrom
2006-04-19  3:04 erik quanstrom
2006-04-19  3:27 Mike Haertel
2006-04-19  8:19 YAMANASHI Takeshi
2006-04-20  1:41 erik quanstrom
2006-04-20  6:17 ` Charles Forsyth
2006-04-20  1:45 erik quanstrom
2006-04-20  3:03 ` Michael Baldwin
2006-04-20  5:58   ` Charles Forsyth
2006-04-21 11:34   ` Bruce Ellis
2006-04-21 15:46     ` Skip Tavakkolian
2006-04-21 15:47     ` Jack Johnson
2006-04-20  9:57 erik quanstrom
2006-04-20 11:00 ` R
2006-04-20 10:30 erik quanstrom
2006-04-20 13:50 ` David Leimbach
2006-04-20 17:55 ` Skip Tavakkolian
2006-04-25  2:02 ` Roman Shaposhnick
2006-04-20 10:36 erik quanstrom
2006-04-21 15:49 erik quanstrom
2006-04-25  2:16 erik quanstrom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8494fb45ef78b3566627c1425c5441b7@coraid.com \
    --to=brantley@coraid.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).