Applications of Probabilistic Quorums to Iterative Algorithms. HyunYoung Lee, University of Denver Jennifer L. Welch, Texas A&M University presented at ICDCS 2001. Outline. The Probabilistic Quorum Algorithm (PQA) Abstracting PQA into Random Register (RR)
Applications of Probabilistic Quorums to Iterative Algorithms
HyunYoung Lee, University of Denver
Jennifer L. Welch, Texas A&M University
presented at ICDCS 2001
X, Y, Z, ...
a write quorum
a read quorum
Achieved when every set of size n/2 +1 is a quorum.
Tradeoff Theorem [Naor & Wool]: For any quorum system, if load is optimal (1/n), then availability is at most (n).
Theorem: If k = (n), then
A read quorum
Drawback: A read quorum might not overlap the most recent write quorum, causing a read to return an out-of-date value.
a write quorum
Theorem: Probability of not overlapping is < e-h2, when k = hn.
One writer and multiple readers.
[R1] Every read or write invocation has a response.
[R2] Every read Rreads from some write W:
(1) W begins before R ends.
(2) R’s value is same as W ’s value.
(3) W is latest such write.
[R3] For every finite execution ending with a write W, probability that W is read from infinitely often is 0 (over all extensions with an infinite number of writes).
Theorem 1: PQA implements an RR.
[R1]: Each invocation gets a response since no lost messages and only crash failures of servers.
[R2]: Each read reads a value written by a previous or overlapping write, since no data corruption.
[R3]: Show probability that at least one replica in a write quorum is never overwritten is 0:
Pr( 1 replica survives h writes )
k Pr( replica j survives h writes )
= k Pr( j Q1 … j Qh )
= k hi=1 Pr( j Qi )
0 as h .
[A1]: All views come from the past.
[A2]: Every component is updated infinitely often.
[A3]: Each view is used only finitely often.
Red views are updated
Arrows indicate views
used in last update.
[A1], [A2], [A3] are equivalent to the existence of a partition of the update sequence into pseudocycles (p.c.’s):
p.c. i -1
Theorem [UD]: Sufficient condition on F for convergence to fixed point, if update sequence satisfies [A1]-[A3]: There exists integer M and sequence of sets D0, D1,… such that
Shown to be an ACO by [UD].
Claim: Worst-case number of pseudocycles for F to converge is log2 diameter(G).
Theorem 2: If F is an ACO, then every iterative execution using RRs for the vector components converges with probability 1.
Proof: Show the sequence of updates in the execution satisfies [A1], [A2] and [A3] with probability 1.
[A1]: All views are from the past by [R2].
[A2]: Application ensures every component is updated i.o.
[A3] holds with probability 1: Each view is used finitely often with probability 1 by [R3].
at least once.
How many (expected) rounds per p.c.?
We don’t know with current RR definition, so modify definition...
[R1] - [R3] plus
[R4]: If read R by process i reads from W and a later read R' by i reads from W' , then W' does not precede W.
[R5]: There exists q s.t. for all r,
Pr[r reads are needed until W or a later write is read from] (1 - q)r-1q.
So q is the probability of a “successful” read (w.r.t. W).
Same as previous probabilistic quorum algorithm, except:
Theorem 3: Attains q = 1 -
W ’s or later value is read if a subsequent read quorum overlaps W ’s quorum.
n - k
Theorem 4: Expected number of rounds per pseudocycle, when implementing an ACO with monotone RRs, is at most 1/q.
Proof: For p.c. h to end, each process i must read from a write first write in p.c. h-1.
Once this read occurs for i, every later read by i is at least as recent, since monotone.
Expected # rounds for first read is 1/q by [R5].
Corollary: For monotone PQA, expected # rounds per p.c. is (1 - ((n-k)/n)k)-1.
Expression is between 1 and 2 when k = n.
Strict quorum system has 1 round per p.c.
Monotone PQA has > 1 expected round per p.c. but may have fewer messages per p.c.
Which has better message complexity?
Messages per round in synchronous case:
MPQA: When k = n, expected # messages per p.c. is c2m(p+1)n, 1 < c < 2.
Recall when k = n, expected # messages per p.c. for MPQA is c2m(p+1)n, 1 < c < 2.
Simulated non-monotone and monotone RR implementations using PQs with APSP application to study:
log2 33 = 6 pseudocycles to converge.
Measured rounds till convergence (when simulated results equaled precomputed actual answer).
Each plotted point is average of 7 runs.
bound is not tight.
Synch & asynch are
Monotone is better