I have a shared memory used by multiple processes, these processes are created using MPI
.
Now I need a mechanism to control the access of this shared memory.
I know that named semaphore
and flock
mechanisms can be used to do this but just wanted to know if MPI provides any special locking mechanism for shared memory usage ?
I am working on C under Linux.
int
across processes any process can read/write on that integer. Also are there any access control mechanisms for this type of shared memory which MPI provides ? Thanks! – Middleaged