Presentation is loading. Please wait.

Presentation is loading. Please wait.

Replication and Consistency CS-4513 D-term 20081 Replication and Consistency CS-4513 Distributed Computing Systems (Slides include materials from Operating.

Similar presentations


Presentation on theme: "Replication and Consistency CS-4513 D-term 20081 Replication and Consistency CS-4513 Distributed Computing Systems (Slides include materials from Operating."— Presentation transcript:

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

2 Replication and Consistency CS-4513 D-term 20082 Problem Given that synchronization and locking is so difficult, do we really need it in a distributed system? Is there a better way?

3 Replication and Consistency CS-4513 D-term 20083 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?

4 Replication and Consistency CS-4513 D-term 20084 Replication The art and science of keeping multiple copies of data in a distributed system Two reasons:– Reliability Performance

5 Replication and Consistency CS-4513 D-term 20085 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

6 Replication and Consistency CS-4513 D-term 20086 Example 2 DNS (Domain Name Service) allows owner of a domain to replicate name database Same two reasons Performance Reliability Also Scaling technique

7 Replication and Consistency CS-4513 D-term 20087 Replication Data centric I.e., try to keep data consistent across replicas Client centric Weaker condition Only maintain consistency for each client separately

8 Replication and Consistency CS-4513 D-term 20088 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

9 Replication and Consistency CS-4513 D-term 20089 Consistency Strict consistency (in time) Not strict consistency

10 Replication and Consistency CS-4513 D-term 200810 Consistency (continued) All processes see updates in same order Processes see updates in opposite order!

11 Replication and Consistency CS-4513 D-term 200811 Consider three processes Three shared variables: x, y, z Initialized to zero Each updates one variable, and then reads and prints other two

12 Replication and Consistency CS-4513 D-term 200812 Of the 90 Valid Execution Sequences, here are four

13 Replication and Consistency CS-4513 D-term 200813 Causal Relationships If A causes B to happen, then A should appear before B to all observers

14 Replication and Consistency CS-4513 D-term 200814 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.

15 Replication and Consistency CS-4513 D-term 200815 Reading Tanenbaum & van Steen (2 nd ed.) –Chapter 7

16 Replication and Consistency CS-4513 D-term 200816 Questions?


Download ppt "Replication and Consistency CS-4513 D-term 20081 Replication and Consistency CS-4513 Distributed Computing Systems (Slides include materials from Operating."

Similar presentations


Ads by Google