home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / bsd / 10252 < prev    next >
Encoding:
Text File  |  1992-12-15  |  4.8 KB  |  91 lines

  1. Newsgroups: comp.unix.bsd
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!ra!tantalus.nrl.navy.mil!eric
  3. From: eric@tantalus.nrl.navy.mil (Eric Youngdale)
  4. Subject: Re: Shared lib benchmarks, and experiences
  5. Message-ID: <BzBG6q.21J@ra.nrl.navy.mil>
  6. Sender: usenet@ra.nrl.navy.mil
  7. Organization: Naval Research Laboratory
  8. References: <1992Dec14.231025.12627@rwwa.COM> <BzAEnE.GKq@ra.nrl.navy.mil> <1992Dec15.141455.14369@rwwa.COM>
  9. Distribution: usa
  10. Date: Tue, 15 Dec 1992 19:44:49 GMT
  11. Lines: 78
  12.  
  13. In article <1992Dec15.141455.14369@rwwa.COM> witr@rwwa.com writes:
  14. >So as long as you reserve enough extra space and you cause (using tools) the
  15. >jump table to be ordered appropriately, your libraries can be made forward
  16. >compatible.  The following restrictions still apply:
  17. >
  18. >  1) You must reserve enough space, which means wasting address space,
  19. >     and, depending on how dynamicly the library changes, you may eventually
  20. >     ``run out'' of space unless you are very liberal in what you reserve.
  21. >     Neither of these problems is very major, assuming some care and
  22. >     forethought in the creation of the library.
  23. >
  24. >  2) You still ``pollute'' the address space of all processes, due to the
  25. >     assigned addresses.  I personally think this is a serious drawback
  26. >     because this problem only grows worse with time, and cannot ever
  27. >     be reduced without creating incompatibility.  And it requires central
  28. >     authority...
  29.  
  30.     It is a drawback, but I feel that it is a relatively minor one.  Under
  31. linux we have reserved 1.5Gb for sharable libaries, and a most we are using
  32. about 0.25% of that right now.  If you assume that because of padding and
  33. allowances for future expansion that the maximum usable fraction of this would
  34. be no less than 25%, then this would mean that we could use at least 375Mb of
  35. sharable libraries.  By todays standards this seems ridiculous, but if we are
  36. looking 5-10 years down the road it might not seem so silly.  Still, this type
  37. of usage would be extremely taxing on the 3/486 architecture as we know it
  38. today and I suspect that any application that needs this much VM would probably
  39. be best run on a 64 bit machine.  
  40.  
  41.     You are also correct about the central authority.  This is all behind
  42. the scenes for most users, but someone does need to coordinate.  Theoretically
  43. we could end up with a situation where one library grew to the point where it
  44. encroached upon another libraries VM, and this could be dealt with by dividing
  45. the library into two separate but interdependent sharable images.  Clearly
  46. given enough time, and enough expansion things could become a real mess.
  47.  
  48.     As a corralary to this, does anyone have a sense of how the dynamic
  49. linking time grows as the library grows?  For example, would it go as N, N^2
  50. (where N is the number of symbols), something inbetween?  If you assume that
  51. function sizes remain roughly constant (so that human programmers can easily
  52. manage them), then conceivably the number of entry points would be proportional
  53. to N, and the number of externals that need to be resolved could also be
  54. proportional to N.  We could also assume that machines will be M times faster,
  55. and this would mean that the dynamic link time could go as N*N/M.  My point is
  56. that the time to dynamically link to 100Mb worth of sharable libraries could
  57. conceivably grow to unacceptable levels.  Right now all we can do is speculate
  58. and extrapolate.
  59.  
  60. >| Inter-calling (calls within the library) are all resolved by the
  61. >| linker without having to even look at the jump table. 
  62. >
  63. >Which, BTW, is a restriction.  A staticly loaded replacement for such
  64. >a routine will not be called by the library code.  Typical examples
  65. >are malloc() routines...
  66.  
  67.     Yes, we do run up against this.  Emacs presents exactly this problem
  68. with malloc.  I know that it can be solved because we all (who use emacs,
  69. anyways) use a version that is linked to a sharable library, but this is
  70. clearly something that does need to be considered in certain cases.
  71.  
  72. >| Anyway, we have been refining the concept for about 6 months, and we
  73. >| now have it to a point where the drawbacks are quite minimal.
  74. >
  75. >I agree.  I still think that the benefits of DSLs make them worth the
  76. >effort though.  I remember my sigh-of-relief when I went from SVR3 to
  77. >SVR4 shared libraries...
  78.  
  79.     There are plusses and minuses to both approaches.  As long as the
  80. details are handled properly, I think that either approach will work just fine
  81. as far as the end user is concerned.  Now that I think about it, I recall that
  82. in our case the people who wanted the DSLs were unwilling/unable to write the
  83. code to make it work.  The people who wanted the fixed address libraries were
  84. willing to do the programming, and this tipped the balance in favor of the
  85. fixed address libraries.  Given that we both inhabit similar types of
  86. "democracies", something like this could well be the deciding factor for 386bsd
  87. as well :-).
  88.  
  89. -- 
  90. Eric Youngdale
  91.