Shared Memory Segment Questions

Shared Memory Segment Questions

Post by GTKWANG%NTUVAX.bit.. » Wed, 04 Mar 1992 07:16:52

Hello members of this discussion group,

  I have some questions on shared memory segment implementation on Unix
which I hope some experts can help.

1). When a process does a shmget to create a shared memory segment, is
    the memory space for it immediately allocated ?

2). Process P1 creates a memory segment and attaches to it. Then process
    P2 gets the memory segment with the same key and attaches to it.
    If P1 detaches from the memory segment and deletes it, what happens
    to process P2's access to the memory segment?

    Following that, if another process P3 creates a memory segment with
    the same key as that used above, what happens to the memory segment
    that process P2 is attached to ?

3). Can anyone recommend a good book that discusses the Unix shared memory
    segment in sufficient detail to answer questions such as those above ?

  Please email me directly because I am not a member of this discussion

  Thanks very much.

/Tek Kee

Nanyang Technological University   Fax: (65) 791-6377
Nanyang Avenue                     Tel: (65) 799-4868
Singapore 2263