[concurrency-interest] On park and unpark

David Holmes davidcholmes at aapt.net.au
Fri Aug 25 18:29:42 EDT 2017


Hi Doug,

> -----Original Message-----
> From: Concurrency-interest [mailto:concurrency-interest-bounces at cs.oswego.edu] On Behalf Of Doug Lea
> Sent: Friday, August 25, 2017 9:13 PM
> To: concurrency-interest at cs.oswego.edu
> Subject: Re: [concurrency-interest] On park and unpark
> 
> 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.

We've been trying to consolidate  and share as much common code as possible on "posix" supporting platforms and recently refactored things to share the PlatformEvent and Parker code (8174231). So to me there would have to be a big win in using futex directly to justify using a custom implementation.

Cheers,
David
 
> -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