DOC PREVIEW
CORNELL CS 514 - Lecture Slides

This preview shows page 1-2-3-21-22-23-43-44-45 out of 45 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 45 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 45 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 45 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 45 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 45 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 45 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 45 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 45 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 45 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 45 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CS514: Intermediate Course in Operating SystemsRECAP: Agreement ProtocolsWhen is agreement needed?FLP was about agreementWe don’t always need the FLP “version” of agreementSlide 6More needs for agreementOne protocol isn’t enough!Agreement: ParadigmsThings we knowWhat about real systems?Real world goals?Performance goalsOther goalsRoadmapSlide 16Historical asideSlide 18Historical AsideNames of some famous systemsWe’re already on track “A”The commit problemAs a time-line pictureObservations?Slide 25In fact we’re missing stuffFault toleranceSlide 28Initiator fails, members healthyIdeas?Leads to two ideasProblems?Slide 33Why do we get stuck?Why not always have a log?3 phase commitSlide 37Why 3 phase commit?Value of 3PC?State diagram for non-faulty memberSome additional detailsWhat next?LayeringBut first…What should you be reading?CS514: Intermediate Course in Operating SystemsProfessor Ken BirmanVivek Vishnumurthy: TARECAP: Agreement ProtocolsThese are used when a set of processes needs to make a decision of some sortThe problem arises often and can take many formsAn agreement protocol solves a simple (single-bit) instance of the general problemGives us a “template” for building fancier protocols that solve other problemsWhen is agreement needed?Recall Sam and Jill from lecture 5Sam was hoping he and Jill could eat outside but they couldn’t get their act together and ended up eating insideIt illustrated a type of impossibility result:Impossible to learn new “common knowledge” facts in an asynchronous distributed systemDefn: “I know that you know that I know…” without any finite limit on the chainFLP was about agreementThere we focused on agreement on the value of a single bitWe concluded thatOne can build decision protocolsAnd prove that they decide correctlyAnd can even include failure handlingBut they can’t guarantee progressIf if we have many processes and know that at most one of them might crashWe don’t always need the FLP “version” of agreementSam and Jill needed an impossible-to-achieve form of agreement!Had they sought a weaker guarantee they might have been able to eat outside without risk!For example: suppose Sam sends “Let’s eat outside” and Jill replies “Sounds good,” and Sam replies “See yah!”3-way handshake has risk built in (if the last message doesn’t get through, what to do?) but the risk isn’t large. If they can live with that risk… it solves the problemFLP is about impossible “progress” propertiesWhen is agreement needed?Situations where agreement arisesOrdering updates to a replicated data itemMight allow concurrent updates from sources that don’t coordinate their actionsOr could have updates that are ordered by, say, use of locking but that might then get disordered in transmission through the networkDecision on which updates “occurred”An issue in systems that experience faultsMore needs for agreementAgreement on the membershipAgreement on the leader, or some other process with a special roleAgreement on a rankingAgreement on loads or other inputs to a load balancing serviceAgreement on the mapping of a name to a target IP address, or on routingOne protocol isn’t enough!We’ll need different solutions for these different agreement problemsBut if we abstract away the detail can learn basic things about how such protocols should be structuredAlso can learn to prove correctnessThen can build specific specialized ones, optimized for a particular use and engineered to perform wellAgreement: ParadigmsWe’ve already seen two examplesFLP involved consensus on a single bitProcesses have a bit values 0 or 1Protocol executesOutcome: all agree on a value (and it was a legitimate input, and they tolerate faults, and we are faithful to the decisions of the dead)Byzantine Agreement: same idea; different modelBut paradigms are about clean theory. Engineering implies a focus on speed!Things we knowFrom FLP we know that this statement of the problem…… can be solved in asynchronous settings… but solution can’t guarantee livenessThere is at least one input scenario and “event sequence” that prevents progressFrom BA, we know that in a system with synchronized rounds, solutions can be found, but they are costlyAnyhow, that synchronous model is impracticalWhat about real systems?Real world is neither synchronous nor asynchronousWe’ve got a good idea of messages latency… and pretty good clocksLike Sam and Jill, we may be able to tolerate undesired but unlikely outcomesAnyhow, no real system can achieve perfect correctness (at best we depend on the compiler, the operating system)Real world goals?Practical solutions that:Work if most of the system is workingTolerate crashes and perhaps even some mild forms of “Byzantine” behavior, like accidental data corruption“Strive to be live” (to make progress) but accept that some crash/partitioning scenarios could prevent this, like it or notWe still want to be rigorousPerformance goalsWant solutions that are cheap, but what should this mean?Traditionally: low total number of messages sent (today, only rarely an important metric)Have low costs in per-process messages sent, received (often important)Have low delay from when update was generated to when it was applied (always VERY important)Other goalsNow we’ll begin to work our way up to really good solutions. These:Are efficient in senses just outlinedAre packaged so that they can be used to solve real problemsAre well structured, so that we can understand the code and (hopefully) debug/maintain it easilyRoadmapTo do thisFirst look at 2-phase and 3-phase commitThis pattern of communication arises in many protocols and will be a basic building blockNext look at “agreeing on membership”Protocols that track membership give fastest update rates, often by orders of magnitude!Then, implement an ordered update (or multicast) over these mechanismsFinally, think about software architecture issuesRoadmapThis will give usA notion of a “process group”Has a name… and a set of members… and the system can dynamically track membershipMembership ranking is useful in applicationsWays to do ordered, reliable, multicast Things built over these primitives: leader


View Full Document

CORNELL CS 514 - Lecture Slides

Documents in this Course
LECTURE

LECTURE

29 pages

LECTURE

LECTURE

28 pages

Load more
Download Lecture Slides
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Slides and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Slides 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?