Shared memory and pointers

John Danner john at wizard.UUCP
Fri Oct 27 11:30:53 AEST 1989


We have a server application running with a group of client applications 
locally.  We would like to use shared memory to allow the clients to look
at the data which comes from a database, without having to use a message
passing scheme.  If some of the data includes pointers to other data, what
is a good way to handle this in shared memory?  The problem of course is
that clients may map shared memory blocks to different addresses, so a pointer
to some address in the server's shared memory probably won't point to the
right place on a client.  Two solutions have been proposed from people in our
group, neither of which are very clean.  First, make sure that every client
maps each block of shared memory to the same location.  Second, replace
pointers with something like objectID's and keep a table on the server which
has block #'s and offsets for each objectID.  

The first just seems ugly, and the second is not very transparent to the
writer of the client.  I'm sure there are quite a few people out there who
have dealt with this problem and wouldn't be surprised if there weren't some
good papers to read about it.  Any info would be greatly appreciated.


John Danner       Tandem Computers, Inc.
Net: pacbell!tandem!wizard!john at decwrl.dec.com
UUCP:...!decwrl!pacbell!tandem!wizard!john



More information about the Comp.unix.questions mailing list