Re: Question about pthread_process_shared attribute
- From: Eric Sosman <Eric.Sosman@xxxxxxx>
- Date: Mon, 15 Oct 2007 10:54:26 -0400
chsalvia@xxxxxxxxx wrote On 10/15/07 08:07,:
For interprocess synchronization mutexes, it seems some
implementations of posix threads support a PTHREAD_PROCESS_SHARED
flag, which can be used so that a mutex can work between processes,
rather than only between threads.
I have two questions about this:
1: In order for inter-process synchronization to work, does the
pthread_mutex_t object need to be placed in shared memory?
Suppose the mutex resides in Process P's private
memory, not shared with other processes. Now explain
how Process Q locks and unlocks a mutex that it can't
get access to, that it can't even see.
"It was on display in the bottom of a locked filing
cabinet stuck in a disused lavatory with a sign on
the door saying `Beware of the Leopard'." -- HHGttG
--
Eric.Sosman@xxxxxxx
.
- References:
- Question about pthread_process_shared attribute
- From: chsalvia
- Question about pthread_process_shared attribute
- Prev by Date: Problem with popen
- Next by Date: Re: will system() waste memory?
- Previous by thread: Question about pthread_process_shared attribute
- Next by thread: Re: Question about pthread_process_shared attribute
- Index(es):
Relevant Pages
|