Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!ucbcad!ucbvax!sdcsvax!darrell From: rab@mimsy.UUCP (Robert A Bruce) Newsgroups: mod.os,comp.os.research Subject: Shared Libraries Message-ID: <2990@sdcsvax.UCSD.EDU> Date: Wed, 15-Apr-87 02:06:35 EST Article-I.D.: sdcsvax.2990 Posted: Wed Apr 15 02:06:35 1987 Date-Received: Sun, 19-Apr-87 04:46:05 EST Sender: darrell@sdcsvax.UCSD.EDU Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 34 Approved: mod-os@sdcsvax.uucp Xref: mnetor mod.os:142 comp.os.research:2 Here at UM we are trying to implement shared libraries as part of an operating system for a multiprocesser computer. The computer consists of 16 MC68010 bases cpu boards, each with a 68450 MMU. We are trying to implement forking and load balancing between processors. There is no shared memory between processor boards, so moving a process to a different cpu requires copying the entire text space. If we use shared libraries the size of the text segment of each process whould be substantially reduced, so copying could be done much more efficiently. I would like to start some discussion about the best way to support shared libraries and how the operating system should support them. Some ideas that I have heard are: 1) Locate the library at a know location in memory. At link time bind all the addresses to the addresses of the library subroutines. This would involve the least overhead, but would also be the most inflexible. Every time the library was changed, or moved to a new location in memory, all programs would need to be relinked. 2) Same as 1) but bind all the addresses when a program is loaded. This would cause more overhead at load time, but minor library changes won't break all existing programs. 3) Use a jump table. The jump table is located at a known location in memory. The location of each jump instruction is bound to the program at link time. Each library call involves one extra jump instruction, but I don't think these jumps would cause a significant performance degradation. 4) Use an `openlibrary' system call that returns a pointer to a table of pointers to library routines. I have heard the amiga uses something like this. This would would require an extra level of of indirection but would be even more flexible.