Shared Library Objectives (Was: Shared Lib Question (ISC))

blarson at blars blarson at blars
Tue May 14 17:46:51 AEST 1991


In article <1991May13.144438.21103 at sco.COM> larryp at sco.COM (Larry Philps) writes:

Hmm, let's compare Primos shared libraries...

>    1) Ability to easily create a shared library:
>	yes)  Do it like Sun, pic code and dynamic linking
Yes.  Creating a shared libarary takes one or two more linker command
than a normal program.

>    2) Fast Startup times:
>	yes)  Do it like ATT, no pic code, no dynamic linking, exec
>	      just sets up the regions and lets it rip.
>	no)   Don't worry about it, let ld.so (or whatever) run, and
>	      set things up.

Sort-of.  Start-up is reasonably fast, but the first time each shared
routine is called it is dynamicly linked.  Registered EPFs are
available at Rev 23 to allow pre-linking of frequently run programs.
(At cost of some of the other points.)

>    3) Fast execution:
>	yes)  Most processors run pic code slower than absolute code,
>	      so you probably pick the absolute method.

Yes.  Reasonably written segmented code doesn't care which segment it
is loaded in.

>    4) Maximum Memory sharing between processes
>	yes)  pic and absolute code should be equivalent if you are
>	      clever.  Ensure the dynamic linker does not fault in most
>	      of the library while patching global data addresses.
Yes.

>    5) Easy maintenance
>	yes)  Want to be able to create new versions easily, update the
>	      libraries with fixes/features without requiring program
>	      recompilation.  Want to be able to link an arbitrary set
>	      of libraries together without worrying about address
>	      conflicts.  Pic and dynamic linking wins here.
Yes.  Also a single user can test out new version without affecting
other users. 

>We did not come up with an implementation that satisfies all the above
>goals.  Anybody know of one?

Primos seems to come close.  A couple of minor details are the
required hardware support (fault bit) and the many other problems of
Primos.   (They still havn't figured out how to do I/O reasonably.)

-- 
blarson at usc.edu
		C news and rn for os9/68k!
-- 
Bob Larson (blars)	blarson at usc.edu			usc!blarson
	Hiding differences does not make them go away.
	Accepting differences makes them unimportant.




More information about the Comp.unix.internals mailing list