1 / 22

Secure & Dependable Computing Lecture: The Paxos Algorithm - Consensus for Asynchronous Systems

This lecture explores the Paxos algorithm for achieving consensus in asynchronous systems, discussing safety, liveness, and the requirements for choosing a value.

blackburnj
Download Presentation

Secure & Dependable Computing Lecture: The Paxos Algorithm - Consensus for Asynchronous Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. EEC 688/788Secure and Dependable Computing Lecture 12 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University wenbing@ieee.org

  2. Outline • Reminder: midterm#2 this Wednesday! • Paxos algorithm • Review exercise for midterm#2 EEC688/788: Secure & Dependable Computing

  3. The Paxos Algorithm – Consensus for Asynchronous Systems • Contribution: separately consider safety and liveness issues. Safety can be guaranteed and liveness is ensured during period of synchrony • Participants of the algorithm are divided into three categories • Proposers: those who propose values • Accepters: those who decide which value to choose • Learners: those who are interested in learning the value chosen EEC688/788: Secure & Dependable Computing

  4. The Paxos Algorithm • How to choose a value • Use a single acceptor: straightforward but not fault tolerant • Use a number of acceptors: a value is chosen if the majority of the acceptors have accepted it EEC688/788: Secure & Dependable Computing

  5. The Paxos Algorithm • Requirements for choosing a value • P1. An acceptor must accept the first proposal that it receives • P2. If a proposal with value v is chosen, then every higher-numbered proposal that is chosen has value v • Since the proposal numbers are totally ordered, P2 guarantees the safety property EEC688/788: Secure & Dependable Computing

  6. The Paxos Algorithm • How to guarantee P2? • P2a: If a proposal with value v is chosen, then every higher-numbered proposal accepted by any acceptor has value v • But what if an acceptor that has never accepted v accepted a proposal with v’? • P2b: if a proposal with value v is chosen, then every higher-numbered proposal issued by any proposer has value v • P2b implies P2a, which implies P2 EEC688/788: Secure & Dependable Computing

  7. The Paxos Algorithm • How to ensure P2b? • P2c: For any v and n, if a proposal with value v and number n is issued, then there is a set S consisting of a majority of acceptors such that either • (a) no acceptor in S has accepted any proposal numbered less than n, or • (b) v is the value of the highest-numbered proposal among all proposals numbered less than n accepted by the acceptors in S EEC688/788: Secure & Dependable Computing

  8. The Paxos Algorithm • To ensure P2c, an acceptor must promise: • It will not accept any more proposals numbered less than n, once it has accepted a proposal n EEC688/788: Secure & Dependable Computing

  9. The Paxos Algorithm • Phase 1. • (a) A proposer selects a proposal number n and sends a prepare request with number n to a majority of acceptors. • (b) If an acceptor receives a prepare request with number n greater than that of any prepare request to which it has already responded, then it responds to the request with a promise not to accept any more proposals numbered less than n and with the highest-numbered proposal (if any) that it has accepted. EEC688/788: Secure & Dependable Computing

  10. The Paxos Algorithm • Phase 2. • (a) If the proposer receives a response to its prepare requests (numbered n) from a majority of acceptors, then it sends an accept request to each of those acceptors for a proposal numbered n with a value v, where v is the value of the highest-numbered proposal among the responses, or is any value if the responses reported no proposals. • (b) If an acceptor receives an accept request for a proposal numbered n, it accepts the proposal unless it has already responded to a prepare request having a number greater than n. EEC688/788: Secure & Dependable Computing

  11. The Paxos Algorithm EEC688/788: Secure & Dependable Computing

  12. Paxos Examples EEC688/788: Secure & Dependable Computing

  13. Paxos Examples EEC688/788: Secure & Dependable Computing

  14. Paxos Examples EEC688/788: Secure & Dependable Computing

  15. Paxos Examples EEC688/788: Secure & Dependable Computing

  16. Paxos Examples EEC688/788: Secure & Dependable Computing

  17. Paxos Examples EEC688/788: Secure & Dependable Computing

  18. Review Problem 1 • In the Needham-Schroeder protocol, Alice generates two challenges, RA and RA2. This seems like overkill. Would one not have done the job? EEC688/788: Secure & Dependable Computing

  19. Review Problem 2 • In the public-key authentication protocol shown below, in message 7, RB is encrypted with KS. Is this encryption necessary, or would it have been adequate to send it back in plaintext? Explain your answer EEC688/788: Secure & Dependable Computing

  20. Review Problem 3 • Give two reasons why PGP compresses messages. EEC688/788: Secure & Dependable Computing

  21. Review Problem 4 • Assuming that everyone on the Internet used PGP, could a PGP message sent to a mailing list and be decoded correctly by all receipants? EEC688/788: Secure & Dependable Computing

  22. Review Problem 5 • The SSL data transport protocol involves two nonces as well as a premaster key. What value, if any, does using the nonces have? EEC688/788: Secure & Dependable Computing

More Related