[concurrency-interest] Lock-free signaling

Joseph Seigh jseigh_cp00 at xemaps.com
Sun Feb 18 21:21:55 EST 2007


David Holmes wrote:

>* Replies will be sent through Spamex to dholmes at ieee.org
>* For additional info click -> http://www.spamex.com/i/?v=13730463
>
>Joe Seigh writes:
>  
>
>>Is there a way to do signaling without requiring a monitor lock?
>>Something like events or eventcounts.   I'm doing an STM implementation
>>    
>>
>and was
>  
>
>>thinking of adding a listener pattern to it but there's no point in
>>making the implementation lock-free if I'm going to need locking to
>>    
>>
>implement
>  
>
>>signaling.
>>    
>>
>
>I don't quite follow the usage context. If the threads you need to signal
>are blocked by calling park(), then a lock-free signal is an unpark(). But
>the hard part is ensuring no lost signals.
>  
>

It looks like they call native methods, at least for Sun's JVM, so that 
might work.

>Or do you mean at a lower level? park()/unpark() may ultimately involved OS
>locks and condvars.
>  
>
There's Linux futexes, windows events, and probably some undocumented 
Solaris interfaces
but yeah, a lock and condvar implementation could be problematic.

--
Joe Seigh



More information about the Concurrency-interest mailing list