views:

29

answers:

1

If you can definitely prove that a method has no linearization points, does it necessarily mean that that method is not linearizable? Also, as a sub question, how can you prove that a method has no linearizatioon points?

+1  A: 

This answer is based on me reading about linearizability on wikipedia for the first time, and trying to map it to my existing understanding of memory consistency through happens-before relationships. So I may be misunderstanding the concept.

If you can definitely prove that a method has no linearization points, does it necessarily mean that that method is not linearizable?

It is possible to have a scenario where shared, mutable state is concurrently operated on by multiple threads without any synchronization or visibility aids, and still maintain all invariants without risk of corruption.

However, those cases are very rare.

how can you prove that a method has no linearizatioon points?

As I understand linearization points, and I may be wrong here, they are where happens-before relationships are established between threads. If a method (recursively through every method it calls in turn) establishes no such relationships, then I would assert that it has no linearizatioon points.

Christian Vest Hansen
Thanks! That helped a little... It's still a mystery to me, though :P
pypmannetjies