> -----Original Message-----
> From: Clemens Ladisch [mailto:clem...@ladisch.de]
> Sent: Wednesday, January 29, 2014 2:31 AM
> To: Network Nut
> Cc: linux-kernel@vger.kernel.org
> Subject: RE: WaitForMultipleObjects/etc. In Kernel
> 
> Network Nut wrote:
> >I was looking at POSIX because it allows naming of the primitives.
> 
> Linux uses two orthogonal mechanisms for synchronization primitives and for
> naming/sharing.
> 
> >I need to epoll_wait on inter-process {mutex, event, semaphore}.
> 
> Use eventfd.
> 
> >I need to reference inter-process {mutex, event, semaphore}, each
> >identified by string, if feasible.
> 
> Send the fd through a Unix domain socket.

Hi Again,

I was thinking that, rather than as for specifics, I should present my general 
problem, and ask how long-time Linux experts would solve it.

I have a master process M, that executes continually, from the birth to death 
of user-session.

I have many (distinct) processes that will be launched, and these processes, 
P1, P2, ...Pn, expect to see that M is executing. These processes:

1. expect to have access to a shared-memory section that already exists because 
M created it
2. expect to use a semaphore that already exists because M created it
3. expect to use a mutex that exists because M created it

P1, P2, ...Pn all know the path of image on disk of M. They are also permitted 
to maintain a fixed string that can be used to "get at" the mutex and semaphore.

How would P1, P2, ...Pn get at the semaphore that M created?

Please note that M cannot have any prior knowledge at all of P1, P2, ...Pn. 
P1...etc. must initiate  communication with M.

[I don't want to misuse/abuse linux-kernel with my personal questions, so if 
there is a more appropriate group, please let me know.]

Regards,

-Net



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to