Consensus Impossibility Dennis Shasha (following Lynch, Fischer, Patterson)

7
Consensus Impossibility Dennis Shasha (following Lynch, Fischer, Patterson)

Transcript of Consensus Impossibility Dennis Shasha (following Lynch, Fischer, Patterson)

Page 1: Consensus Impossibility Dennis Shasha (following Lynch, Fischer, Patterson)

Consensus Impossibility

Dennis Shasha (following Lynch, Fischer, Patterson)

Page 2: Consensus Impossibility Dennis Shasha (following Lynch, Fischer, Patterson)

Failure Model

• Processes can fail-stop (but that is all; no fail traitorous).

• Communication is two-way.• Messages can be dropped or take an

arbitrarily long time.• To show: no algorithm can guarantee to solve

consensus in the face of fail-stop processes and unlimited message delays.

Page 3: Consensus Impossibility Dennis Shasha (following Lynch, Fischer, Patterson)

Bald Man’s Paradox

• Man with a full head of hair is not bald.• Man with no hair is bald.• Suppose you tell me that a man with x number

of hairs or more is not bald.• Suppose the man has an opaque patch on his

head• Outside of patch, man has less than x number of

hairs. • What’s under patch determines status!

Page 4: Consensus Impossibility Dennis Shasha (following Lynch, Fischer, Patterson)

Consensus Problem Simplified

• Every input process has either a 0 or 1.• If all working processes have 1 initially, then all

should conclude 1.• If all working processes have 0 initially, then all

should conclude 0• In any other case, all should conclude either 0

or 1 but they must all agree.

Page 5: Consensus Impossibility Dennis Shasha (following Lynch, Fischer, Patterson)

Terminology

• State is just set of states of individual processes.

• State is univalent for 1 (respectively 0), if, regardless of failures, the conclusion will be 1 (respectively 0).

• State is bivalent if could go either to 0 or to 1.

Page 6: Consensus Impossibility Dennis Shasha (following Lynch, Fischer, Patterson)

There must be some bivalent initial states

• Suppose that every initial state having at least x% of 1s is univalent for 1 and any less is univalent for 0.

• If one process is not communicating, then maybe that would make the difference.

• So others can’t decide.• Therefore that state is bivalent.

Page 7: Consensus Impossibility Dennis Shasha (following Lynch, Fischer, Patterson)

From Every Bivalent State, another bivalent state is reachable

• Suppose some message sent and received changes the state from bivalent to univalent.

• If that message can be lost, then state is still bivalent.

• Conclusion: we can be bivalent forever.• Nota Bene: might be very unlikely to remain in

such a state (e.g. two phase commit).