following implementation using one shared register among the processes. Non-atomic The naive, non-atomic implementation: Increment: Read the value in the register R Add one to the value Writes the new value back into register R Read: Read register R This simple implementation is not linearizable, as is demonstrated by the following example. Imagine two processes are running accessing the single counter object initialized to have value 0: The first process reads the value in the register as 0. The first process adds one to the value, the counter's value should be 1, but before it has finished writing the new value back to the register it may become suspended, meanwhile the second process is running: The second process reads the value in the register, which is still equal to 0; The second process adds one to the value; the second process writes the new value into the register, the register now has value 1. The second process is finished running and the first process continues running from where it left off: The first process writes 1 into the register, unaware that the other process has already updated the value in the register to 1. In the above example, two processes invoked an increment command, however the value of the object only increased from 0 to 1, instead of 2 as it should have. One of the increment operations was lost as a result of the system not being linearizable. The above example shows the need for carefully thinking through implementations of data structures and how linearizability can have an effect on the correctness of the system. Atomic To implement a linearizable or atomic counter object we will modify our previous implementation so each process Pi will use its own register Ri Each process increments and reads according to the following algorithm: Increment: Read value in register Ri. Add one to the value. Write new value back into Ri Read: Read registers R1, R2, ... Rn. Return the sum of all registers. This implementation solves the problem with our original implementation. In this system the increment operations are linearized at the write step. The linearization point of an increment operation is when that operation writes the new value in its register Ri. The read operations are linearized to a point in the system when the value returned by the read is equal to the sum of all the values stored in