1 / 15

Replication and Consistency

Replication and Consistency. CS-4513 D-Term 2007 (Slides include materials from Operating System Concepts , 7 th ed., by Silbershatz, Galvin, & Gagne, Modern Operating Systems , 2 nd ed., by Tanenbaum, and Distributed Systems: Principles & Paradigms , 2 nd ed. By Tanenbaum and Van Steen).

arleen
Télécharger la présentation

Replication and Consistency

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. Replication and Consistency CS-4513D-Term 2007 (Slides include materials from Operating System Concepts, 7th ed., by Silbershatz, Galvin, & Gagne, Modern Operating Systems, 2nd ed., by Tanenbaum, and Distributed Systems: Principles & Paradigms, 2nd ed. By Tanenbaum and Van Steen) Replication and Consistency

  2. Problem • Given that synchronization and locking is so difficult, do we really need it in a distributed system? • Is there a better way? Replication and Consistency

  3. Example • Grapevine registry contains a list of items • Groups • Individuals • If we need to update one item, do we need to lock entire registry? • Where do we update that one item? • How does it get propagated to other replicas? Replication and Consistency

  4. Replication • The art and science of keeping multiple copies of data in a distributed system • Two reasons:– • Reliability • Performance Replication and Consistency

  5. Example 1 • Grapevine keeps replicas of each registry on at least three Registration Servers • At least one is located far away • Performance • Registries accessed frequently – spread the load • Updates happen often enough that locking a registry would be a real bottleneck • Reliability • Destination registry needed for sending a message • Even if a server is down or network is partitioned Replication and Consistency

  6. Example 2 • DNS (Domain Name Service) allows owner of a domain to replicate name database • Same two reasons • Performance • Reliability • Also • Scaling technique Replication and Consistency

  7. Replication • Data centric • I.e., try to keep data consistent across replicas • Client centric • Weaker condition • Only maintain consistency for each client separately Replication and Consistency

  8. General Approach • Update a single item in local replica • Atomically • Time-stamp – e.g., logical clock • Replica propagates update to all of its other replicas • Periodically • Receiving replica merges update with its own copy • Conflicting updates resolved arbitrarily to latest time-stamp Replication and Consistency

  9. Strict consistency (in time) Not strict consistency Consistency Replication and Consistency

  10. All processes see updates in same order Processes see updates in opposite order! Consistency (continued) Replication and Consistency

  11. Consider three processes • Three shared variables: x, y, z • Initialized to zero • Each updates one variable, and then reads and prints other two Replication and Consistency

  12. Four Valid Execution Sequences Replication and Consistency

  13. Causal Relationships • If A causes B to happen, then A should appear before B to all observers Replication and Consistency

  14. Summary • Can be very complicated • Textbooks go into much greater depth • Needed for particular distributed systems • Can be ignored in others • In Grapevine, update may not be reflected to updater! • Simply retry later. Replication and Consistency

  15. Questions? Replication and Consistency

More Related