master-degree-notes/Concurrent Systems/notes/10 - Consensus Implementation.md

1.4 KiB

Which objects allow for a wait free implementation of (binary) consensus? The answer depends on the number of participants

The consensus number of an object of type T is the greatest number n such that it is possible to wait free implement a consensus object in a system of n processes by only using objects of type T and atomic R/W registers.

For all T, CN(T) > 0; if there is no sup, we let CN(T) := +∞

Thm: let CN(T1) < CN(T2), then there exists no wait free implementation of T2 that only uses objects of type T1 and atomic R/W registers, for all n s.t. CN(T1) < n <= CN(T2).

Proof:

  • Fix such an n; by contr., there exists a wait free implementation of objects of type T2 in a system of n processes that only uses objects of type T1 and atomic RW reg.s.
  • Since n ≤ CN(T2), by def. of CN, there exists a wait free implementation of consensus in a system of n processes that only uses objects of type T2 and atomic RW reg.s.
  • Hence, there exists a wait free implementation of consensus in a system of n processes that only uses objects of type T1 and atomic RW reg.s.
    • contradiction with CN(T1) < n

Schedules and Configurations

Schedule: sequence of operation invocations issued by processes Configuration: the global state of a system at a given execution time (values of the shared memory + local state of every process).

Given a configuration C and a schedule S, we denote with S(C) the configuration obtained starting from C and applying S.