L10b.sp11 - Distributed Systems Distributed Systems CS 425...

Info icon This preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Distributed Systems CS 425 / CSE 424 / ECE 428 Fall 2011 Distributed Systems CS 425 / CSE 424 / ECE 428 Fall 2011 Leader Election Reading: Sections 12.3 010, I . Gupta, K. Nahrtstedt, S. Mitra, N. Vaidya, M. T. Harandi, J. Hou
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Why Election? Why Election? Example 1: In the sequencer-based algorithm for total ordering of multicasts, the "sequencer” = leader Example 2: Group of cloud servers replicating a file need to elect one among them as the primary replica that will communicate with the client machines Any more examples ? What if the leader fails ?
Image of page 2
What is Election? What is Election? In a group of processes, elect a Leader to undertake special tasks. What happens when a leader fails (crashes) Some process detects this (how?) Then what? Focus of this lecture: Election algorithm 1. Elect one leader only among the non-faulty processes 2. All non-faulty processes agree on who the leader is
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Any process can call for an election . A process can call for at most one election at a time. Multiple processes can call an election simultaneously. All of them together must yield a single leader Messages are eventually delivered. Assumptions Assumptions
Image of page 4
At the end of the election protocol, the non- faulty process with the best (highest) election attribute value is elected. Attribute examples: leader has highest id or address, or fastest cpu, or most disk space, or most number of files, etc. A run (execution) of the election algorithm must always guarantee at the end: Safety: 2200 non-faulty p: (p’s elected = (q: a particular non- faulty process with the best attribute value) or ) Liveness: 2200 election: (election terminates) & 2200 p: non-faulty process, p’s elected is not Problem Specification Problem Specification
Image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
N Processes are organized in a logical (directed) ring p i has a communication channel to p (i+1) mod N . All messages are sent clockwise around the ring. Any process p may initiate leader election by sending “election” message that contains p ’s own id:attr to next node in the ring When a process receives an election message, it compares the attr in the message with its own attr. If the received attr is greater, the receiver forwards the message.
Image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.
  • Spring '08
  • Hu
  • Analysis of algorithms, AirTrain Newark, Best, worst and average case, Worst-case scenario, Worst-Case Scenario series

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern