Concurrent code and expensive instructions
Concurrent code and expensive instructions
Posted Feb 12, 2014 11:16 UTC (Wed) by ego360 (subscriber, #39650)Parent article: Concurrent code and expensive instructions
Nice article Paul.
In the answer to Quick quiz 2, you say:
However, the linearizability of this function depends on the counter always being incremented by the value 1
If the counter is always incremented by some constant value k, that would also guarantee linearizability, no ?
It is interesting that you mention the split counter approach to implement a counter that doesn't lose counts and yet doesn't use any heavyweight instructions. The G-Counters implemented in RIAK as a part of their Conflict Free Replicated Datatypes (CRDT) suite use a similar approach. It is another story that these data structures have been implemented for the distributed systems world. But then considering that on modern multiprocessor systems, the data is cached at so many levels, should we not model these systems as distributed systems since different processing units might not have the same view of the state of the system? We could then use alternate weaker notions of consistency such as eventual consistency to argue about the correctness about our implementations instead of ignoring concurrent algorithms that are not linearizable.
