Title: Consensus Hierarchy Part 1
1Consensus HierarchyPart 1
2Consensus in Shared Memory
Consider processors in shared memory
3Local memory
Local memory
Shared memory
Every process starts with an initial value stored
in local memory (0 or 1)
4communication through shared memory
5At the end of execution, every process has
decided the same value (0 or 1)
6Validity condition
If every process starts with the same value, the
every process should decide that value
Additional condition The decided value is one of
the initial values
7Wait-freedom in asynchronous systems
A process should be able to finish execution of
an algorithm even if all other processes fail
8Read/Write
Shared Memory
Suppose that the shared Memory can only be
accessed through Read or Write operations
9Theorem
Wait-free consensus cannot be solved using only
read/write objects for processors
Proof of Theorem
We will show that any algorithm that solves
consensus, has an execution that never terminates
10System configuration
Is the set of all variables in the system,
including local and shared
11A distributed system execution can be always be
viewed a sequence of configurations
Initial configuration
Final configuration
Read or Write
Processor action
12Valence of system configurations
bivalent
univalent
bivalent
univalent
0-valent
1-valent
Consensus value at possible execution paths
13To prove the theorem, we will show that there is
always an execution where every configuration is
bivalent
14Similar configurations for processor
Same shared variables Local variables of others
may differ
15Lemma
If there exist univalent configurations
and such that
then if is -valent then is
-valent too
Proof of Lemma
16Univalent
All possible executions from
final decision for each Possible execution
Execution with only taking actions
17Univalent
Univalent
Execution with only taking actions
Execution with only taking actions
18Univalent
Univalent
Execution with only taking actions
Execution with only taking actions
19Univalent
Univalent
Execution with only taking actions
Execution with only taking actions
End of Lemma Proof
20Lemma
There exists a bivalent initial configuration
Proof of Lemma
21Possible Initial Configurations
Local Memory
Shared Memory
Initial Configuration
Empty
22Possible Initial Configurations
Local Memory
Shared Memory
Initial Configuration
?
Empty
0-valent
1-valent
23Possible Initial Configurations
Local Memory
Shared Memory
Initial Configuration
Empty
0-valent
1-valent
1-valent?
No, because
24Possible Initial Configurations
Local Memory
Shared Memory
Initial Configuration
Empty
0-valent
1-valent
0-valent?
No, because
25Possible Initial Configurations
Local Memory
Shared Memory
Initial Configuration
Empty
0-valent
1-valent
bivalent
End of Lemma Proof
26Critical processor for a configuration
the configuration is bivalent, and after the
processor takes step the configuration becomes
univalent
Bivalent
Univalent
27Lemma
If is a bivalent configuration then, there
is at least one processor which is not critical
Proof of Lemma
28Assume for contradiction that all processors are
critical
univalent
Possible executions
bivalent
univalent
univalent
29It cannot be that all have the same valence
valent
bivalent
valent
valent
30It cannot be that all have the same valence
Contradiction
valent
bivalent
valent
valent
valent
31There must exist two processors with different
valences
bivalent
32Case 1 suppose that they access different
shared variables
bivalent
x
Read x
y
Read y
33two possible executions
bivalent
Read y
Read x
different valence
impossible since
Read y
Read x
34same result holds for any kind of operation
(Read or Write) that the processors apply to x
and y
35Case 2 suppose that they access the same
shared variable
subcase read/read
bivalent
x
Read x
Read x
36two possible executions
bivalent
Read x
Read x
different valence
impossible since
Read x
Read x
37subcase read/write
bivalent
Read x
Write x
38two possible executions
bivalent
Write x
Read x
different valence
impossible since
Write x
Read x
39subcase write/write
bivalent
Write x
Write x
different valence
impossible since
Write x
Write x
40In all cases we obtained contradiction
Therefore, there exists a processor which is not
critical
univalent
bivalent
univalent
bivalent
(not critical)
univalent
End of Lemma Proof
41Therefore, we can construct an execution
bivalent
bivalent
bivalent
Never ends
Initial configuration
Consensus can never be reached
End of Theorem Proof