Dennis Kafura – CS5204 – Operating Systems Quorum Protocol Dennis Kafura – CS5204 – Operating Systems
Dennis Kafura – CS5204 – Operating Systems A scenario Alice and Bob have 10 friends that they see on a regular basis, but not each friend every day. As she meets them, Alice begins telling these friends something she wants Bob to know. Alice shares the information with 6 friends. Later, Bob – expecting to hear from Alice – begins asking these friends if they have heard from Alice. How many friends must Bob ask to be guaranteed of receiving the information from Alice? Dennis Kafura – CS5204 – Operating Systems
Dennis Kafura – CS5204 – Operating Systems A scenario Alice and Bob have N friends that they see on a regular basis, but not each friend every day. As she meets them, Alice begins telling these friends something she wants Bob to know. Alice shares the information with W friends. Later, Bob – expecting to hear from Alice – begins asking these friends if they have heard from Alice. How many friends, R, must Bob ask to be guaranteed of receiving the information from Alice? Dennis Kafura – CS5204 – Operating Systems
Replication and Quorums Replication improves reliability and performance. Reliability: increased probability of an available replica Performance: read most quickly accessible replica However, availability may be lost If all replicas must be updated and a replica is unavailable (failure, network partition, overload) Client must wait until all replicas available Solution: reads must obtain R replicas writes must update W replicas even if not all N replicas are available Problem: inconsistency may arise if R and W are not chosen carefully. Dennis Kafura – CS5204 – Operating Systems
Dennis Kafura – CS5204 – Operating Systems Loss of Consistency W + R N W: writes R: reads 1 . . . 2 2 2 N Dennis Kafura – CS5204 – Operating Systems
Dennis Kafura – CS5204 – Operating Systems Quorum Consistency W + R N W: writes R: reads 1 . . . 2 2 2 N Dennis Kafura – CS5204 – Operating Systems
Dennis Kafura – CS5204 – Operating Systems Quorum Consistency W + R N W: writes R: reads 1 . . . 2 2 2 2 N Dennis Kafura – CS5204 – Operating Systems