[concurrency-interest] Elements in AtomicReferenceArray and AtomicReference both distinct?
mr.chrisvest at gmail.com
Wed Aug 1 12:03:42 EDT 2012
You are more likely to run into false sharing (cache-line contention) with
AtomicReferenceArray, when threads concurrently write to element indices
that are close to each other, than you are with an array of AtomicReference
objects. On the other hand, the latter uses more memory.
The implementation of ARA does not use locks:
On 1 August 2012 17:24, Raph Frank <raphfrk at gmail.com> wrote:
> I always assumed that elements in an AtomicReferenceArray were
> distinct. Threads that accessed different elements would not
> This thread suggests otherwise, that the protection is at the entire
> array level.
> Which is correct, do an array of AtomicReferences give better concurrency?
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest