Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] System V Shared Memory for Open MPI: Request for Community Input and Testing
From: Christopher Samuel (samuel_at_[hidden])
Date: 2010-05-02 08:36:40


On 01/05/10 23:03, Samuel K. Gutierrez wrote:

> I call shmctl IPC_RMID immediately after one process has
> attached to the segment because, at least on Linux, this
> only marks the segment for destruction.

That's correct, looking at the kernel code (at least in the
current git master) the function that handles this - do_shm_rmid()
in ipc/shm.c - only destroys the segment if nobody is attached
to it, otherwise it marks the segment as IPC_PRIVATE to stop
others finding it and with SHM_DEST so that it is automatically
destroyed on the last detach.

cheers,
Chris

-- 
  Christopher Samuel - Senior Systems Administrator
  VLSCI - Victorian Life Sciences Computational Initiative
  Email: samuel_at_[hidden] Phone: +61 (0)3 903 55545
          http://www.vlsci.unimelb.edu.au/