Lecture 17: Voting Protocol

These topics are from Chapter 13 (Fault Tolerance) in Advanced Concepts in OS

Topics for Today

Voting Protocols

Static Voting

Static Voting

For a read or write request initiated by site i:

at site j:

at site i:

Read Quorum Test


Vr =
å
k Î P 
Vk ³ r

Where P is the set of sites that replied.

Write Quorum Test


Vw =
å
k Î Q 
Vk ³ w

Where M = max{VNj | j Î P} is the largest version number reported in the vote, and
Q = {j Î P | VNj = M } includes only the votes that correspond to that version number

Voting Algorithm (continued)

at site i:

at other sites:

Vote Assignment

If v is the total number of votes, we want to choose r and w such that
r + w > v and
w > v/2

Why?

Consequences

How many temporary site failures can we tolerate?

What happens when a site comes back on line after failing?

What happens if the network is partitioned?

Tuning Example

SiteVotesRead Access Time
1175ms
21750ms
32750ms
41100ms

If r=1 and w=5, the read access time is 75ms and the write access time is 750 ms. Any single site failure will prevent writes.

If r=3 and w=3, the access times are unchanged, but writes are still possible with a single site failure.

If site 4 is more reliable, we can further improve reliability by readjusting the votes as follows.

SiteVotesRead Access Time
1175ms
21750ms
31750ms
42100ms

Dynamic Voting Protocols

Dynamic Vote Reassignment

What are the strengths and weakenesses of each?

Autonomous Vote Reassignment

Vote Increasing Protocol

When site i wants to increase Vi[i]:

When site j receives a vote-increasing request from site i with Vi, Ni, and x:

Vote Decreasing Protocol

When site i wants to decrease Vi[i]:

When site j receives a vote-decreasing request from site i with Vi and Ni:

Vote Collecting Protocol

Deciding the Outcome

Let K be the set of all sites, and G be the set of sites that responded to the ballot.


TOT =
å
k Î K 
vi[k]

RCVD =
å
k Î G 
vi[k]

Site i has a majority iff RCVD > TOT/2.

Vote Increasing Policies

The above all leaves open the question of when a site should try to increase or decrease its vote.

This is normally done in response to detection of an apparent failure.