This is a 2005 presentation on the use of transactional memory to support parallelism through synchronized block semantics. Measurements done on Azul's Vega hardware, which was the first commercial hardware to ship with HTM support. Many lessons learned since then, but a good reference point in time, and with Intel x86 now supporting similar HTM capabilities, we're sure to see this subject revived.
Reader/writer locks are an attempt at solving this but they do not solve this completely because they do not distinguish different buckets usually.
In summary, we have discussed the CIO Challenges, the emerging category of BTO and Mercury Interactive’s new BTO solution suite. Let’s discuss how customers get started and see results through BTO. Unlike the mega projects of the last decade, BTO solutions are not monoliths that require tens of millions of dollars, several years of implementation and still present an uncertain outcome. BTO is incremental and immediate – focusing first on improving what the customer has “today”. In 3-6 weeks customers can see improvements in their existing environments.
Talking points: HW is conservative, can detect false collision without data contention.
Reader/writer locks are an attempt at solving this but they do not solve this completely because they do not distinguish different buckets usually.
Hashtable size: 100 entries
Same Hashtable as before, now with some collisions.
Make size() cheap and reduce the window of potential data contention inside size().
For the Accounts example one could argue the use of concurrent.Atomics, since this only updates a single variable. Whereas a Point cannot be updated with one atomic operation.