1 / 10

Consistency Models

Explore the impact of multiple copies on consistency, various consistency models like strict, sequential, causal, FIFO, and their implementations in distributed systems. Delve into rules governing replicated data and the order of operations.

callison
Download Presentation

Consistency Models

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. Consistency Models

  2. A Replication Problem • Multiple copies may lead to consistency problems. • Whenever a copy is modified, that copy becomes different from the rest. • Modifications have to be carried out on all copies to ensure consistency. • The type of application has an impact on the consistency requirements needed and thus on the implementation.

  3. Consistency Model • A consistency model describes the rules to be used in updating replicated data • The rules define the order of operations. • Rules used depend on the application • Consistency defined within the context of read and write operations on shared data is data-centric • Strict • Sequential • Causal • FIFO

  4. Strict Consistency • Strict consistency is defined as follows: • Read is expected to return the value resulting from the most recent write operation • Assumes absolute global time • All writes are instantaneously visible to all • Suppose that process pi updates the value of x to 5 from 4 at time t1 and multicasts this value to all replicas • Process pj reads the value of x at t2 (t2 > t1). • Process pj should read x as 5 regardless of the size of the (t2-t1) interval.

  5. Strict Consistency • What if t2-t1 = 1 nsec and the optical fiber between the host machines with the two processes is 3 meters. • The update message would have to travel at 10 times the speed of light • Not allowed by Einsten’s special theory of relativity. • Can’t have strict consistency

  6. Sequential Consistency • Sequential Consistency: • The result of any execution is the same as if the (read and write) operations by all processes on the data were executed in some sequential order • Operations of each individual process appears in this sequence in the order specified by is programs. • We have seen this in the banking example • One implementation used Lamport’s clocks.

  7. Causal Consistency • Causal Consistency: That if one update, U1, causes another update, U2, to occur then U1 should be executed before U2 at each copy. • Application: Bulletin board • Possible Implementation: Using vector clocks

  8. FIFO Consistency • Writes done by a single process are seen by all other processes in the order in which they were issued • … but writes from different processes may be seen in a different order by different processes. • i.e., there are no guarantees about the order in which different processes see writes, except that two or more writes from a single source must arrive in order.

  9. FIFO Consistency • Caches in web browsers • All updates are updated by page owner. • No conflict between two writes • Note: If a web page is updated twice in a very short period of time then it is possible that the browser doesn’t see the first update. • Implementation: • Each process adds the following to an update message: (process id, sequence number) • Each other process applies the update messages in the order received from a single process.

  10. Consistency Models • Lots of them • We will discuss one more which will be related to the next paper you will review

More Related