← Back to blog

Lower bound (time) on approximate agreement in shared memory

concurrency

Algorithm

Consider an asynchronous shared memory model with single write registers and no process failures. Approximate agreement between nn processes is the problem of agreeing nn output values within ϵ\epsilon of each other, and all falling in the interval [\min\(\mathcal{I}), \max(\mathcal{I})], where I\mathcal{I} is a set of input values assigned 1-1 to processes.

Result and proof

Any solution with input values in {0,1}\{ 0, 1\} and ϵ<1\epsilon < 1 that provides obstruction freedom (each process will finish if it is scheduled for sufficiently many consecutive steps) has time complexity at least nn.

Proof: suppose for contradiction suppose it's possible in less than nn steps. Take two solo executions σi\sigma_i and σj\sigma_j of PiP_i and PjP_j, starting at states (configurations) CiC_i and CjC_j. In CiC_i all input values are 00, and in CjC_j all input values are 11 . PiP_i and PjP_j will output 00 and 11. Both PiP_i and PjP_j cannot distinguish CiC_i and CjC_j from a starting point CC, where PiP_i is given input 00 and PjP_j is given 11.

Moreover, in any execution a process does not have time to read the register of all other processes and write to its own register. This at least one of PiP_i and PjP_j will not have time to distinguish CiC_i (CjC_j) from CC. To see this, without loss of generality, if PiP_i does not read from PjP_j during σi\sigma_i then the execution σjσi\sigma_j\sigma_i, starting from CC, will not be valid. If PiP_idoes read from PjP_j, but does not write to its own register, then PjP_j cannot distinguish CC and the state after running σi\sigma_i from CC. Therefore, starting from CC, σiσj\sigma_i\sigma_j will not be valid □

Links