[concurrency-interest] regarding StampedLock

Doug Lea dl at cs.oswego.edu
Tue Oct 16 18:56:16 EDT 2012

On 10/15/12 11:34, Dr Heinz M. Kabutz wrote:

> my performance test is based on some starvation research I did in 2008 regarding
> ReadWriteLock: http://www.javaspecialists.eu/archive/Issue165.html

I'm still exploring some different policy options, but here's a quick
note on your test: If you report locks per thread, rather than total locks,
then starvation tendencies across varying numbers of readers vs writers
(keeping total the same) are easier to describe: For a writer, you expect
approximately the same lock rate whether the other locking threads are
readers vs writers. The overall rates may differ across different hold
times etc but for each choice, this property should hold for
starvation-avoiding RW Locks.  (A similar but less simple property
should hold for readers.)


More information about the Concurrency-interest mailing list