CH - 9 A Greem en T Protocols: 9.1 in Trod U Ction
CH - 9 A Greem en T Protocols: 9.1 in Trod U Ction
9 Agreem en t Protocols
9.1 In trodu ction
In d istribu ted system s, w h ere sites (or p rocessors) often com p ete as
w ell as coop erate to achieve a com m on goal, it is often requ ired th at
sites reach m u tu al agreem ent .
- Ex) In d istribu ted d atabase system s, d ata m an agers at sites m u st
agree on w h eth er to com m it or to abort a tran saction .
Th e form al settin g for a distribu ted agreem ent p rotocol is th e
followin g : Th ere are M p rocessors P=p 1 ,...,p M th at are tryin g to reach
agreem ent . A su bset F of th e p rocessors are fau lty, an d rem ainin g
p rocessors are n onfau lty . Each p rocessor p i P stores a valu e Vi .
Du rin g th e agreem ent p rotocol, th e p rocessors calcu late an agreem ent
v alu e A i . After th e p rotocol en d s, th e followin g tw o con d ition s sh ou ld
h old :
For every p air p i an d p j of n on fau lty p rocessors, A i = A j . This
v alu e is th e agreem en t valu e.
Th e agreem ent valu e is a fu nction of th e initial valu es {Vi } of th e
n onfau lty p rocessors (P - F).
- 1 -
- 2 -
Byzantin e
Con sen su s
On e p rocessor
All p rocessors
Interactiv e
Con sistency
All p rocessors
A v ector of
v alu es
- 3 -
- 4 -
- 5 -
- 6 -
- 7 -
i
x
- 8 -
i
x
K
2
- 2) (referred to as th e condition
of initiation).
Fou r ru les
In th e first rou n d , th e sou rce broad casts its valu e to all oth er
p rocessors.
In a rou n d k>1, a p rocessor broad casts th e n am es of all p rocesses
for w hich it is eith er a d irect or in d irect su p p orter an d wh ich it
h as n ot p reviou sly broadcast . If th e con dition of initiation w as tru e
at th e en d of th e p reviou s rou n d , it also broadcasts th e "*" m essage
u nless it h as p reviou sly d on e so.
If a p rocessor confirm s H IGH nu m ber of p rocessors, it com m its to
a valu e of 1.
After rou n d 2m +3, if th e valu e 1 is com m itted , th e p rocessors agree
on 1; oth erw ise, th ey agree on 0.
Exam p le
- 9 -
p rocessors, 3m +1
fau lty p rocessors, m
sou rce is n onfau lty .
- 10 -