Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
Voting Protocol
In Distributed
system
By: Vasundhara
Ghose
B.Tech (CSE)
1
2

Topic covered :
3

Problem of service-denial
 Non-blocking protocols can’t
tolerate


 Multiple

site failures
 Communication failures...
4

 SET

OF RULES FOR FAILURE RECOVERY IN
D.S.
 Assignment of no. of votes of Each replica
 If(majority of votes collec...
5
6

Proposed by Gifford.

System model of S.V.P. : Replica of files lies on different sites.


Sites wants to
access fi...
7

 Lock

generating rules(while assessing a

file):
 One writer and No readers
 Multiple readers and no writers
 Each...
8

Version
number stores
In Stable
storage
After every
successful
updating

Updates its
Version
number
9

Assignment of votes to each replica

 Votes are collected by requesting process
10

 When process of

site i requests for read/write

 Step 1: LOCK_REQUEST

 Step 2: Vote_REQUEST(WHEN lock is granted...
11

Site i

Okay let me
decide on basis
of rule of
algorithm 
Weather I
have
quorum or
not ??
12

If(Request is for Read)
Vr=ΣVk
 P=

sets of sites which have replied

Vk= No of votes assigns/given by site k
 If
...
13

If(Request is for WRITE)
VW=ΣVk
 P=

sets of sites which have replied

Vk= No of votes assigns/given by site k
Q

...
14

 If

( Site’s request is
unsuccessful)

{
RELEASE_LOCK to all
sites and its lock
manger
}

 If

( site’s request
get...
15

 If

( request was for
read)

 If

( Reqest for write)

{
{
Read the latest
current copy
available locally
}

 Upda...
16

 RELEASE_LOCK

REQUEST to all manager

and all sites in P
 After receiving > updating in local copy by
sites
 Relea...
17

V= total no. of votes assigned to all

the replica
R= read quorum ; w=write quorum
r+w>v
w > v/2
18

 None

of old copies are updated.
 W = sum of subsets of replica
 R intersection w != null
 W value should high an...
19

Case 1:

r=1 and w=5
Case 2: r=w=3
Case 3: site 3 is more
reliable

1

Votes=1
75 msecs

2

4
Votes=1
750 msecs

3

Vo...
20

So this type of voting scheme is known
as static voting scheme, because voting
assign policy does not bother with stat...
21

Case 4: Site 3 fails
/unreachable,simultanously with
any site unavailable
1

Votes=1
75 msecs

2

4
Votes=1
750 msecs
...
22

>> Dynamic voting protocol


DVP
23

Majority based
approach

• Adaptive set of sites
• To allow access to data for
updating when state of system
change.

...
24

 Dynamic voting protocol ensures

more availability

than static voting protocol.
 Static voting protocol is non-ada...
25
Prochain SlideShare
Chargement dans…5
×

Voting protocol in distributed system

24 891 vues

Publié le

  • Identifiez-vous pour voir les commentaires

Voting protocol in distributed system

  1. 1. Voting Protocol In Distributed system By: Vasundhara Ghose B.Tech (CSE) 1
  2. 2. 2 Topic covered :
  3. 3. 3 Problem of service-denial  Non-blocking protocols can’t tolerate   Multiple site failures  Communication failures  Network partitioning failures
  4. 4. 4  SET OF RULES FOR FAILURE RECOVERY IN D.S.  Assignment of no. of votes of Each replica  If(majority of votes collected) { Replica is accessed by process }  More fault tolerant than a commit protocol
  5. 5. 5
  6. 6. 6 Proposed by Gifford. System model of S.V.P. : Replica of files lies on different sites.  Sites wants to access file (LOCK EXISTS} Site has to unlock it
  7. 7. 7  Lock generating rules(while assessing a file):  One writer and No readers  Multiple readers and no writers  Each site has lock manager.  Lock manger >> LOCK related operations  Version number for every file
  8. 8. 8 Version number stores In Stable storage After every successful updating Updates its Version number
  9. 9. 9 Assignment of votes to each replica  Votes are collected by requesting process
  10. 10. 10  When process of site i requests for read/write  Step 1: LOCK_REQUEST  Step 2: Vote_REQUEST(WHEN lock is granted)  Step 3: reception of VOTE REQUEST at site j If(lock request granted) { return( VN , NO. of votes assigned to replica ); } to site i
  11. 11. 11 Site i Okay let me decide on basis of rule of algorithm  Weather I have quorum or not ??
  12. 12. 12 If(Request is for Read) Vr=ΣVk  P= sets of sites which have replied Vk= No of votes assigns/given by site k  If ( Vr>= r ) { Successful in obtaining read quorum }
  13. 13. 13 If(Request is for WRITE) VW=ΣVk  P= sets of sites which have replied Vk= No of votes assigns/given by site k Q can be defined as M=max{VNj : j€P} Q={j€P : VNj=M}  If VW>= W ) ( { Successful in obtaining WRITE quorum(w) }
  14. 14. 14  If ( Site’s request is unsuccessful) { RELEASE_LOCK to all sites and its lock manger }  If ( site’s request gets Quorum) { if(Weather it is latest copy or not) yes-> next step No> obtain current copy }
  15. 15. 15  If ( request was for read)  If ( Reqest for write) { { Read the latest current copy available locally }  Update local copy  Update Version number  Send all updates and version number to all sites Q }
  16. 16. 16  RELEASE_LOCK REQUEST to all manager and all sites in P  After receiving > updating in local copy by sites  Releasing of locks (after receiving RELEASE_LOCK)
  17. 17. 17 V= total no. of votes assigned to all the replica R= read quorum ; w=write quorum r+w>v w > v/2
  18. 18. 18  None of old copies are updated.  W = sum of subsets of replica  R intersection w != null  W value should high and high for disallowing simultaneous updating
  19. 19. 19 Case 1: r=1 and w=5 Case 2: r=w=3 Case 3: site 3 is more reliable 1 Votes=1 75 msecs 2 4 Votes=1 750 msecs 3 Votes=1 100 msecs Votes=2 750 msecs
  20. 20. 20 So this type of voting scheme is known as static voting scheme, because voting assign policy does not bother with state of system..
  21. 21. 21 Case 4: Site 3 fails /unreachable,simultanously with any site unavailable 1 Votes=1 75 msecs 2 4 Votes=1 750 msecs 3 Votes=2 100 msecs Votes=1 750 msecs
  22. 22. 22 >> Dynamic voting protocol  DVP
  23. 23. 23 Majority based approach • Adaptive set of sites • To allow access to data for updating when state of system change. Dynamic vote re-assignment • The number of votes changes assigned to sites • To allow access to data for updating when state of system change
  24. 24. 24  Dynamic voting protocol ensures more availability than static voting protocol.  Static voting protocol is non-adaptive in nature, that's why its hard to survive for that.  Selection time dependent on system characterstics in dynamic voting protocol.
  25. 25. 25

×