Professional Documents
Culture Documents
CS-4513
Distributed Computing Systems
(Slides include materials from Operating System Concepts, 7th ed., by Silbershatz, Galvin, & Gagne,
Distributed Systems: Principles & Paradigms, 2nd ed. By Tanenbaum and Van Steen, and
Modern Operating Systems, 2nd ed., by Tanenbaum)
• Wired systems
• Bully algorithm
• Ring algorithm
• Wireless systems
• Assume
• All processes know about each other
• Processes numbered uniquely
• Suppose P notices no coordinator
• Sends election message to all higher numbered
processes
• If none response, P takes over as coordinator
• If any responds, P yields
• …
CS-4513 D-term 2008 Election Algorithms 5
Bully Algorithm (continued)
• …
• Suppose Q receives election message
• Replies OK to sender, saying it will take over
• Sends a new election message to higher numbered
processes
• Repeat until only one process left standing
• Announces victory by sending message saying that
it is coordinator
• …
• Suppose R comes back on line
• Sends a new election message to higher numbered
processes
• Repeat until only one process left standing
• Announces victory by sending message saying that
it is coordinator (if not already coordinator)
• Existing (lower numbered) coordinator yields
• Hence the term “bully”
CS-4513 D-term 2008 Election Algorithms 8
Alternative – Ring Algorithm
Coordinator=6
[5,6,0,1]
[2,3,4,5] [2,3,4]
[2,3,4,5,6,0] [1,2,3,4,5,6,0]
[5,6,0,1,2]
[2,3,4,5,6]
[5,6,0,1,2,3]
[2,3,4,5] [5,6,0,1,2,3,4]
Coordinator=6
[1,2,3,4,5,6,0]
[5,6,0,1,2,3,4]
Coordinator=6
• Different assumptions
• Message passing is less reliable
• Network topology constantly changing
• Expanding ring of broadcast
• Election messages
• Decision rules for when to yield
• Two approaches:–
– Iterative
– Recursive
Non-authoritative answer:
Name: cs.wpi.edu
Address: 130.215.28.181
• Google
• Yahoo
• MSN
• Need to distribute names geographically
• Need to distribute different addresses for same name
• Special handling of replicated databases