[concurrency-interest] Lock-free signaling
jseigh_cp00 at xemaps.com
Mon Feb 19 06:19:19 EST 2007
David Holmes wrote:
>>There's Linux futexes, windows events, and probably some undocumented
>>but yeah, a lock and condvar implementation could be problematic.
>Current hotspot implementation is mutex+condvar on Solaris and Linux, and an
>Event on Windows.
I once did a lock-free condvar implementation on Linux using the futex
syscall. The NPTL version uses
an internal mutex. I measured a 10% scalability performance
difference. That's at least 10%
because Linux preempts signalers and that causes major degradation in
scalability so the
actual amount of degradation might be much greater.
Hopefully the atomics use native compare and swap where possible.
More information about the Concurrency-interest