[concurrency-interest] Question about phasers and cache lines

David Holmes davidcholmes at aapt.net.au
Wed Nov 30 04:24:42 EST 2011


Mohan Radhakrishnan writes:
> I understand forkjoin has a work stealing algorithm that could be
> useful on multicore processors.

I think that is somewhat inverted. Parallel decomposition techniques benefit
from parallel processing - ie from multi-processors or multi-cores. Within
such a framework work-stealing is just a generic technique to allow
otherwise idle threads to continue doing useful work, avoid the need for
context switching and thus reduce overhead.

> Can anyone point out what facility a
> phaser has similarly to work better on multicore processors ? I
> couldn't locate anything after a search.

Sorry I don't understand the question - "work better" than what? A Phaser is
a generic synchronization barrier. As with the other j.u.c synchronizers it
utilizes lock-free techniques to improve scalability on multi-processors.

David Holmes



More information about the Concurrency-interest mailing list