Linearizability Linearizability is a correctness criterion for concurrent object (Herlihy & Wing ACM TOPLAS 1990). It provides the illusion that each operation.

Slides:



Advertisements
Similar presentations
COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 7: Consistency 4/13/20151Distributed Systems - COMP 655.
Advertisements

Linearizability Linearizability is a correctness criterion for concurrent object (Herlihy & Wing ACM TOPLAS 1990). It provides the illusion that each operation.
Replication. Topics r Why Replication? r System Model r Consistency Models r One approach to consistency management and dealing with failures.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Consistency Steve Ko Computer Sciences and Engineering University at Buffalo.
Consistency and Replication Chapter Topics Reasons for Replication Models of Consistency –Data-centric consistency models: strict, linearizable,
Replication Management. Motivations for Replication Performance enhancement Increased availability Fault tolerance.
Consistency and Replication
DISTRIBUTED SYSTEMS II REPLICATION CNT. II Prof Philippas Tsigas Distributed Computing and Systems Research Group.
Consistency and Replication. Replication of data Why? To enhance reliability To improve performance in a large scale system Replicas must be consistent.
Computer Science Lecture 14, page 1 CS677: Distributed OS Consistency and Replication Today: –Introduction –Consistency models Data-centric consistency.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Consistency Steve Ko Computer Sciences and Engineering University at Buffalo.
Distributed Systems Spring 2009
Computer Science Lecture 14, page 1 CS677: Distributed OS Consistency and Replication Today: –Introduction –Consistency models Data-centric consistency.
CS 582 / CMPE 481 Distributed Systems
CPSC 668Set 16: Distributed Shared Memory1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
Distributed Systems Fall 2009 Replication Fall 20095DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
Computer Science Lecture 14, page 1 CS677: Distributed OS Consistency and Replication Introduction Consistency models –Data-centric consistency models.
Replication Improves reliability Improves availability ( What good is a reliable system if it is not available?) Replication must be transparent and create.
Replicated Data Management DISHELT FRANCISCO TORRES PAZ.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Distributed Shared Memory Steve Ko Computer Sciences and Engineering University at Buffalo.
CIS 720 Lecture 16. Client-Centric Consistency Intended to address the issues in eventual consistency for mobile clients. –Consistent for a single.
Consistency and Replication Chapter 6. Release Consistency (1) A valid event sequence for release consistency. Use acquire/release operations to denote.
Consistency and Replication. Replication of data Why? To enhance reliability To improve performance in a large scale system Replicas must be consistent.
Byzantine fault-tolerance COMP 413 Fall Overview Models –Synchronous vs. asynchronous systems –Byzantine failure model Secure storage with self-certifying.
Consistency and Replication Distributed Software Systems.
IM NTU Distributed Information Systems 2004 Replication Management -- 1 Replication Management Yih-Kuen Tsay Dept. of Information Management National Taiwan.
Replication (1). Topics r Why Replication? r System Model r Consistency Models – How do we reason about the consistency of the “global state”? m Data-centric.
CSE 486/586 CSE 486/586 Distributed Systems Consistency Steve Ko Computer Sciences and Engineering University at Buffalo.
Linearizability Linearizability is a correctness criterion for concurrent object (Herlihy & Wing ACM TOPLAS 1990). It provides the illusion that each operation.
Consistency and Replication Chapter 6. Topics Reasons for Replication Models of Consistency –Data-centric consistency models –Client-centric consistency.
Distributed Systems CS Consistency and Replication – Part I Lecture 10, September 30, 2013 Mohammad Hammoud.
Replication (1). Topics r Why Replication? r System Model r Consistency Models r One approach to consistency management and dealing with failures.
Chapter 4 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University Building Dependable Distributed Systems.
Linearizability Linearizability is a correctness criterion for concurrent object (Herlihy & Wing ACM TOPLAS 1990). It provides the illusion that each operation.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Consistency Steve Ko Computer Sciences and Engineering University at Buffalo.
Hwajung Lee.  Improves reliability  Improves availability ( What good is a reliable system if it is not available?)  Replication must be transparent.
Replication Improves reliability Improves availability ( What good is a reliable system if it is not available?) Replication must be transparent and create.
CSE 486/586 Distributed Systems Consistency --- 3
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Set 16: Distributed Shared Memory 1.
Consistency and Replication Chapter 6 Presenter: Yang Jie RTMM Lab Kyung Hee University.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Replication Steve Ko Computer Sciences and Engineering University at Buffalo.
EEC 688/788 Secure and Dependable Computing Lecture 9 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
CSE 486/586 CSE 486/586 Distributed Systems Consistency Steve Ko Computer Sciences and Engineering University at Buffalo.
Reliable multicast Tolerates process crashes. The additional requirements are: Only correct processes will receive multicasts from all correct processes.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Consistency Steve Ko Computer Sciences and Engineering University at Buffalo.

CSE 486/586 Distributed Systems Consistency --- 2
CS6320 – Performance L. Grewe.
CSE 486/586 Distributed Systems Consistency --- 1
6.4 Data and File Replication
Consistency and Replication
Replication and Consistency
CSE 486/586 Distributed Systems Consistency --- 3
Consistency Models.
Replication and Consistency
Distributed systems II Replication Cnt.
Linearizability Linearizability is a correctness criterion for concurrent object (Herlihy & Wing ACM TOPLAS 1990). It provides the illusion that each operation.
DATA CENTRIC CONSISTENCY MODELS
CSE 486/586 Distributed Systems Consistency --- 1
Replication Improves reliability Improves availability
EEC 688/788 Secure and Dependable Computing
Replication Improves reliability Improves availability
EEC 688/788 Secure and Dependable Computing
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Distributed Systems CS
EEC 688/788 Secure and Dependable Computing
CSE 486/586 Distributed Systems Consistency --- 2
CSE 486/586 Distributed Systems Consistency --- 3
CSE 486/586 Distributed Systems Consistency --- 1
Replication and Consistency
Presentation transcript:

Linearizability Linearizability is a correctness criterion for concurrent object (Herlihy & Wing ACM TOPLAS 1990). It provides the illusion that each operation on the object takes effect in zero time, and the results are “equivalent to” some legal sequential computation.

Linearizability A trace is in a read-write system is consistent, when every read returns the latest value written into the shared variable preceding that read operation. A trace is linearizable, when (1) it is consistent, and (2) the temporal ordering among the reads and writes is respected. W (x:=0)R (x=1) W (x:=1) R(x=1) (Initially x=y=0) W (x:=0) Is it a linearizable trace?

Sequential consistency Some interleaving of the local temporal order of events at the different replicas is a consistent trace. W(x:=100) W(x:=99] R(x=100) R(x=99)

Sequential consistency Is sequential consistency satisfied here? Assume that initially x=y=0. W(x:=10) W(x:=8] W(x=20) R(x=20) R(x:=10) R(x=10)

Causal consistency All writes that are causally related must be seen by every process in the same order. W(x:=10) W(x:=20) R(x=10)R(x=20) R(x=10)

Implementing consistency models Why are there so many consistency models? Each model has a use in some application. The cost of implementation (as measured by message complexity) decreases as the models become “weaker”.

Implementing linearizability Read x W(x:=10) W (x:=20) Needs total order multicast of all reads and writes Read x

Implementing linearizability The total order broadcast forces every process to accept and handle all reads and writes in the same temporal order. The peers update their copies in response to a write, but only send acknowledgements for reads. After this, the local copy is returned

Implementing sequential consistency Use total order broadcast all writes only, but for reads, immediately return local copies.

Exercise Let x, y be two shared variables Process PProcess Q { initially x=0}{ initially y=0} x :=1;y:=1; if y=0  x:=2 fi ; if x=0  y:=2 fi ; Print xPrint y If sequential consistency is preserved, then what are the possible values of the printouts? List all of them.

Client centric consistency model

Read-after-read If read from A is followed by read from B then the second read should return a data that is as least as new as the previous read. This means, once read, subsequent reads by the client must return the same value, or a more recent value A B Iowa City San Francisco Read x = 20 (ts = 42) Read x = 30 (ts = 60) Or read x = 75 (ts = 90)

Client centric consistency model Write-after-write A write by a client must be propagated to all replicas before a subsequent write by the same client takes effect regardless of the location of replicas Iowa City New York Alabama Florida W(x:=10)W(x:=20)

Client centric consistency model Read-after-write Each process must be able to see its own writes. Consider updating a webpage. If the editor and the browser are not integrated, the editor will send the updated HTML page to the server, but the browser in a different location may return an old copy of the page when you view it. This is bad. Edit webpage here Server Browse the webpage Server

Client centric consistency model Write-after-read Each write operation following a read should take effect on the previously read copy, or a more recent version of it. x:=0 x:=20 x:= x+5 x=5 or 25? Write should take effect on x=20 Iowa city San Francisco Alice then went to San Francisco

Quorum-based protocols Replicas of databases improve the availability. To synchronize the updates, a quorum system engages a designated minimum number of the replicas for every read or write operation – this number is called the read or write quorum. When the quorum is not met, the operation (read or write) is not performed.

The architecture RM replicas Replica managers clients

Quorum-based protocols To write, update > N/2 of them, and tag it with new version number. To read, access > N/2 replicas with version numbers. Otherwise abandon the read. Thomas rule N = no of replicas. Write quorum Ver 3 Ver 2 Read quorum

Rationale N = no of replicas. Ver 3 Ver 2 If different replicas store different version numbers for an item, the state associated with a larger version number is more recent than the state associated with a smaller version number. We require that R+W > N, i.e., read quorums always intersect with write quorums. This will ensure that read results always reflect the result of the most recent write (because the read quorum will include at least one replica that was involved in the most recent write).

How it works 1. Send a write request containing the state and new version number to all the replicas and waits to receive acknowledgements from a write quorum. At that point the write operation is complete. 2. Send a read request for the version number to all the replicas, and wait for replies from a read quorum. N = no of replicas.

Quorum-based protocols After a partition, only the larger segment runs the consensus protocol. The smaller segment contains stale data, until the network is repaired. Ver.0 Ver.1

Quorum-based protocols No partition satisfies the read or write quorum

Quorum-based protocols Asymmetric quorum: W + R > N W > N/2 No two writes overlap No read overlaps with a write. R = read quorumW = write quorum