[concurrency-interest] On park and unpark

Brian S O'Neill bronee at gmail.com
Fri Aug 25 10:34:41 EDT 2017


What would be the potential wins from using a Futex directly? By the 
time park/unpark is called (from AQS et al), the thread has determined 
that the expensive operation must be performed. Is there any step that 
the Futex could potentially bypass?

On 2017-08-25 04:12 AM, Doug Lea wrote:
> On 08/25/2017 05:37 AM, Andrew Haley wrote:
>> At the bottom of every blocking operation in j.u.c is the park/unpark
>> pair.  I'm curious about the choice of these primitives.
> 
> They were introduced by Dave Dice (in hotspot) and me (in j.u.c
> in the original jsr166), as the most OS-independent low-level blocking
> primitives we could imagine -- it is a leaky one-bit semaphore,
> inspired in part from some 1990s DEC SRC papers. My 2004 AQS paper
> http://gee.cs.oswego.edu/dl/papers/aqs.pdf includes some discussion.
> 
> BTW, on linux, it should be more efficient to implement using
> Futex instead of the current scheme based on original Solaris
> version. But no one has ever volunteered to do this.
> 
> -Doug
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
> http://cs.oswego.edu/mailman/listinfo/concurrency-interest
> 


More information about the Concurrency-interest mailing list