🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: net.unix.-wizards
1 messages
1 total messages Started by utzoodecvaxharpoeaglemhuxtmhuxam... Tue, 10 Aug 1982 10:16
shared subroutines for unix?
#1
Author: utzoodecvaxharpoeaglemhuxtmhuxam...
Date: Tue, 10 Aug 1982 10:16
37 lines
2212 bytes
I am wondering if anyone has ever tried to implement some
sort of mechanism to share a single copy of common subroutines
amoung processes in unix.  Such a thing would offer the ability
to use rather large libraries in many processes of a real-time
system without a tremendous swapping overhead (I'm talking about
usg unix).

On the vax with usg unix 4.0 or 5.0, it should be possible to place
common routines in regular shared memory, or to make some pages
of the system region readable and place the routines there.
The problem then becomes one of linkage:  how does the non-shared
code reference the shared code, and how does the shared code
reference anything that is not on the stack?  The non-shared code
could call a shared routine via a pointer to a function, but the
shared code must reference globals and statics at fixed addresses.
The only solutions I can think of are to change the shared code to
avoid globals and statics, or to place a table of pointers to
certain globals and statics at a certain fixed address of non-shared
text (say, near zero), and let the shared code reference these
variables indirectly.

Another related question is whether or not the C compiler generates
position independent code (I haven't had time to try to figure out
for myself).  This would be important if the shared routines were to
be placed in regular shared memory.

I believe that such schemes have been used before on other operating
systems (e.g. mert, vax/vms), but I have never heard of anyone being
interested in doing it for unix.  Is there some relevant issue that
I am missing?  I would also be interested in hearing from anyone
who has experience using such a facility (e.g. to tell me that it
is a good or bad idea).

Thanks in advance,

	Jan Edler		..!pyuxjj!pyuxll!jse	(btl piscataway)
				..!cmcl2!edler		(nyu)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads