master-degree-notes/Concurrent Systems/notes/9 - Consensus.md

1.8 KiB

Given objects of type T and an object of type Z, is it possible to wait-free implement Z by using only objects of type T and atomic R/W registers?

If yes, then Z is not as essential as T (T can do everything Z can do).

But what is the type of an object?

  1. the set of all the possible values for states of objects of that type
  2. a set of operations for manipulating the object, each provided with a specification: a description of the conditions under which the operation can be invoked and the effect of the invocation

We focus on types whose operations are:

  • Total: all operations can be invoked in any state of the object
  • Sequentially specified: given the initial state, the behavior depends only by the sequence of operations, where the output to every operation invocation only depends on the input arguments and the invocations preceding it
    • formally, 𝛿(s, op(args)) = {⟨s1,res1⟩,…, ⟨sk,resk⟩}
    • it is deterministic whenever k=1, for every s and every op(args)
      • è deterministica quando dato uno stato e dato un'operazione, posso raggiungere solo uno stato (se raffigurato come grafo, ci sarebbe un solo arco)
    • ricorda un po' gli automi o le Turing Machine

An object of type T_{U} is universal if every other object can be wait-free implemented using only objects of type T_U and atomic R/W registers.

This object is a consensus object: a one-shot object (every process can access it at most once) that provides only one operation propose(v) such that:

  • Validity: the returned value (or decided value) is one of the arguments of the propose (proposed value) in one invocation done by a process (participant)
  • Integrity: every process decides at most once
  • Agreement: the decided value is the same for all processes
  • Wait-freedom: every invocation of propose by a correct process terminates