From 163e33eb7e237c413041b86b25283764b8825126 Mon Sep 17 00:00:00 2001 From: Marco Realacci Date: Mon, 31 Mar 2025 08:40:43 +0200 Subject: [PATCH] vault backup: 2025-03-31 08:40:43 --- Concurrent Systems/notes/9 - Consensus.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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 +