process-sharable pthread synchronous objects

Alexander Kabaev kabaev at gmail.com
Wed Jan 6 02:55:21 UTC 2010


On Wed, 6 Jan 2010 03:38:35 +0100
Attilio Rao <attilio at freebsd.org> wrote:

> 2010/1/6 David Xu <davidxu at freebsd.org>:
> > I want to go further to make some pthread synchronous objects
> > process-sharable, do you guy think it is worthy ?
> > except mutex and condition variable, others like rwlock and spinlock
> > are relative simple.
> 
> I'm afraid people is going to produce very messy system resulting in
> process shared mutexes where IPC or threads may be used and causing
> more harms than good.
> Besides that, semaphore can "emulate" a fair amount of locking
> features in a non-trivial fashion, forcing developers to think a lot
> about it, thus reducing the risk of error.
> 
> Said that, I think that introducing shared semaphore has been a good
> idea, but I would not go further than that.
> 
> Thanks,
> Attilio
> 
> 

I respectfully disagree and think having pthread-agnotsic locks
processes can use to synchronize access to, say, shared memory segment
content is a good think to have. People are perfectly capable of
screwing up any powerful tool they are given, but that is not the
reason to be held back.

Solaris had lwp_{mutex|cond} for ages and lived.

-- 
Alexander Kabaev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20100106/5ba22875/signature.pgp


More information about the freebsd-current mailing list