[concurrency-interest] ArrayBlockingQueue (and possibly others) not waking on interrupt?

Andrew Haley aph at redhat.com
Wed Dec 10 13:12:51 EST 2014


On 12/03/2014 12:10 PM, Doug Lea wrote:
> Continuously blocking and unblocking a bunch of threads such
> that only one of them is running at any given time is among
> the slowest things you can do on a multicore these days, no
> matter what synchronization scheme you use.

System call time seems to dominate things.  Handoff to a thread
spinning on a shared memory location seems to take 50-75ns, but
awakening a stopped thread with a futex(2) takes at least a
microsecond.  There must be plenty of scope for research in this area,
because it's a real hindrance to use of multicore machines if it
takes longer to awaken worker threads than it does to do the work.

Andrew.


More information about the Concurrency-interest mailing list