home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!munnari.oz.au!sgiblab!spool.mu.edu!howland.reston.ans.net!usc!cs.utexas.edu!hermes.chpc.utexas.edu!news.utdallas.edu!corpgate!crchh327!bnr.ca!dgg
- From: dgg@bnr.ca (Gordon Grimes)
- Subject: Re: Objects in Shared Memory
- Sender: news@news.rich.bnr.ca (news server)
- Message-ID: <C1HM7B.Gnt@news.rich.bnr.ca>
- Date: Wed, 27 Jan 1993 00:47:35 GMT
- References: <19930125.084616.825@almaden.ibm.com> <1993Jan25.105459.4799@hellgate.utah.edu>
- Nntp-Posting-Host: 131.253.206.67
- Organization: BNR
- Lines: 44
-
- In article <1993Jan25.105459.4799@hellgate.utah.edu>, clark%asylum.cs.utah.edu@cs.utah.edu (Charles Clark) writes:
- |> In article <19930125.084616.825@almaden.ibm.com> jimi@vnet.ibm.com (Jim Meyers) writes:
- |> >>
- |> >>The first of these approaches is not complete in that it does not
- |> >>address the problem of intra-object references. Thus, virtual base classes
- |> >>can not be used in the inheritance hierarchy of the shared objects.
- |> >
- |> >This is not all clear to me... Can you elaborate on why you believe that
- |> >Jordan's method does not support intra-object references?
- |>
- |> After reviewing Jordan's paper, I see that intra-object references will
- |> resolve correctly (Jim, thanks for pointing this out). His method
- |> requires that, not only the location of the vtable be coordinated, but
- |> also the location of the shared memory segment be coordinated. This means
- |> that each process which accesses the shared memory segment must attach
- |> that memory segment at the same virtual memory address. With the memory
- |> segment at the same vm address, the intra-object references will resolve
- |> correctly.
- |>
- |> Straying from the orignal subject a little, how can the location of the
- |> shared memory segments be coordinated? The vtable location is fixed at
- |> link edit time, thus one would know then whether there is a conflict.
- |> Since the creation and attachment of the shared memory segment is at run-
- |> time, how can one ensure that the vm address of each of the cooperating
- |> processes will be available?
- |>
- |> --Charles
- |>
-
- Some operating systems (HPUX-8.0, for instance) reserve specific virual
- addresses for shared memory segments. As I recall, the manual implies
- that each shmem area has its *own* predetermined segment. This would
- suggest that attaching the same shmem area in two processes gaurentees
- their identical mapping.
-
- I could understand the reasons for an OS to go halfway: start allocating
- virtual addresses from, say, 0xc0000000 upward for attached segments, but
- not promise that shmem area "A" will map to the exact same virtual address
- in two process. If one is working on such an OS the workaround is to
- programmatically ensure that both processes attach the areas in the same
- order.
-
- Gordon Grimes
- Bell Northern Research
-