Question

As part of some analysis of JVM STM frameworks, I am considering re-engineering an open source library's locking mechanisms to using STM instead. I would then run some tests to compare performance, ease of coding etc.

Obviously the performance tests would have to favour STM's optimistic locking but can work out the semantics of that later.

However, for now, I am just interested in open source library candidates. One that springs to mind is EhCache as it has internal locking measures.

What else might be suitable candidates?

Was it helpful?

Solution

I would assume that STM

  • produces more elegant code however
  • it is much slower than reasonable use of locks. It can be so much slower that it's slow than writing single threaded code without locks.

Note: STM relocking can get into a situation like a deadlock where it never obtains all the locks it needs.

You are likely to find than STM is too immature to provide performance advantages.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top