diff --git a/Concurrent Systems/notes/9 - Consensus.md b/Concurrent Systems/notes/9 - Consensus.md index fe4c083..60120dc 100644 --- a/Concurrent Systems/notes/9 - Consensus.md +++ b/Concurrent Systems/notes/9 - Consensus.md @@ -20,4 +20,20 @@ This object is a **consensus object**: a *one-shot object* (every process can ac - **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 \ No newline at end of file +- **Wait-freedom:** every invocation of propose by a correct process terminates + +Conceptually, we can implement a consensus object by a register X, initialized at ⊥, for which the propose operation is atomically defined as: +``` +propose(v) := + if X = ⊥ then + X <- v + return X +``` + +Universality of consensus holds as folows: +- given an object O of type Z +- each participant runs a local copy of O, all initialized at the same value +- create a total order on the operations O, by using consensus objects +- force all processes to follow this order to locally simulate O + - all local copies are consistent +