Consistency and Replication CSCI 6900/4900. FIFO Consistency Relaxes the constraints of the causal consistency “Writes done by a single process are seen.

Slides:



Advertisements
Similar presentations
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Advertisements

COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 7: Consistency 4/13/20151Distributed Systems - COMP 655.
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.
Consistency and Replication Chapter 7 Part II Replica Management & Consistency Protocols.
Consistency and Replication Chapter Introduction: replication and scalability 6.2 Data-Centric Consistency Models 6.3 Client-Centric Consistency.
Consistency and Replication Chapter Topics Reasons for Replication Models of Consistency –Data-centric consistency models: strict, linearizable,
Principles and Paradigms Consistency and Replication
Consistency and Replication
Consistency and Replication Chapter 6. Object Replication (1) Organization of a distributed remote object shared by two different clients.
Replication and Consistency Chapter 6. Data-Centric Consistency Models The general organization of a logical data store, physically distributed and replicated.
Consistency Models Based on Tanenbaum/van Steen’s “Distributed Systems”, Ch. 6, section 6.2.
Consistency and Replication Chapter 7. n Most of the lecture notes are based on slides by u Prof. Jalal Y. Kawash at Univ. of Calgary u Prof. Kenneth.
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.
Distributed Systems1 Chapter 8: Replication and Consistency  Replication: A key to providing good performance, high availability and fault tolerance in.
Consistency And Replication
Consistency and Replication
Distributed Systems CS Consistency and Replication – Part II Lecture 11, Oct 10, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud.
Distributed Systems Spring 2009
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Computer Science Lecture 14, page 1 CS677: Distributed OS Consistency and Replication Today: –Introduction –Consistency models Data-centric consistency.
Consistency and Replication. Why Replicate Data? Enhance reliability. Improve performance. But: if there are many replicas of the same thing, how do we.
Consistency and Replication Chapter 6. Reasons for Replication Data replication is a common technique in distributed systems. There are two reasons for.
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.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Consistency.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Client-Centric.
1 Consistency and Replication Reasons for Replication Reliability Performance –Scaling with respect to size of geographic area Negative Points Having multiple.
Consistency and Replication Chapter 7
Consistency & Replication Chapter No. 6
1 6.4 Distribution Protocols Different ways of propagating/distributing updates to replicas, independent of the consistency model. First design issue.
Consistency and Replication Chapter Concepts Reasons for Replication Reliability Earthquake, flood Misoperation Performance Place copies of data.
Consistency and Replication
C. Xu, Replication and Consistency Data and Object Replication Data Consistency Model Implementation Issues.
Consistency And Replication
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Consistency.
Consistency and Replication Chapter 7. n Most of the lecture notes are based on slides by Prof. Jalal Y. Kawash at Univ. of Calgary n Some notes are based.
Lazy Release Consistency for Software Distributed Shared Memory Pete Keleher Alan L. Cox Willy Z.
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.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Consistency and Replication Distributed Software Systems.
Ch 10 Shared memory via message passing Problems –Explicit user action needed –Address spaces are distinct –Small Granularity of Transfer Distributed Shared.
第5讲 一致性与复制 §5.1 副本管理 Replica Management §5.2 一致性模型 Consistency Models
Distributed Shared Memory Presentation by Deepthi Reddy.
Consistency and Replication Chapter 6 Presenter: Yang Jie RTMM Lab Kyung Hee University.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Distributed Systems Replication. Why Replication Replication is Maintenance of copies at multiple sites Enhancing Services by replicating data Performance.
DISTRIBUTED COMPUTING
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Consistency and Replication Chapter 6. Topics Reasons for Replication Models of Consistency –Data-centric consistency models –Client-centric consistency.
Shyh-In Hwang in Yuan Ze University1 Chapter 6 Consistency and Replication.
Consistency and Replication. Outline Introduction (what’s it all about) Data-centric consistency Client-centric consistency Replica management Consistency.
Distributed Systems CS Consistency and Replication – Part IV Lecture 13, Oct 23, 2013 Mohammad Hammoud.
Client-Centric Consistency Models
Consistency and Replication Chapter 6 Presenter: Yang Jie RTMM Lab Kyung Hee University.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
OS2 –Sem 1, Rasool Jalili Consistency and Replication Chapter 6.
Consistency and Replication (1). Topics Why Replication? Consistency Models – How do we reason about the consistency of the “global state”? u Data-centric.
Distributed Systems: Consistency and Replication Ghada Ahmed, PhD. Assistant Prof., Computer Science Dept. Web:
CS6320 – Performance L. Grewe.
Consistency and Replication
Consistency and Replication
Consistency Models.
Consistency and Replication
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Replica Placement Model: We consider objects (and don’t worry whether they contain just data or code, or both) Distinguish different processes: A process.
Presentation transcript:

Consistency and Replication CSCI 6900/4900

FIFO Consistency Relaxes the constraints of the causal 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” Also called PRAM consistency in DSMs –Writes by a process can be pipelined without waiting for other processes Easy to implement

FIFO Consistency-Example A valid sequence of events of FIFO consistency

FIFO Consistency [Contd.] Process P1Process P2 x = 1; if (y == 0) kill (P2); y = 1; if (x == 0) kill (P1); FIFO consistency can lead to counter-intuitive results Both processes can be killed in the example below

Weak Consistency Even FIFO consistency is too restrictive for some applications All processes need not see all writes Example: Processes in critical region. –Only one process can be in critical region –Individual writes need not be communicated to all replicas –Sending final results to all replicas suffices Synchronization variable – Synchronize(S) synchronizes all copies of data store

Weak Consistency - Properties Accesses to synchronization variables associated with a data store are sequentially consistent –All operations on synchronization variable are seen in the same order at all processes No operation on a synchronization variable is allowed to be performed until all previous writes have been completed everywhere –“Flushes the pipeline” forces all writes to be completed everywhere No read or write operation on data items are allowed to be performed until all previous operations to synchronization variables have been performed. –When processes read or write all synchronization operations should have been complete

Weak Consistency [Contd.] A program fragment in which some variables may be kept in registers. int a, b, c, d, e, x, y;/* variables */ int *p, *q;/* pointers */ int f( int *p, int *q);/* function prototype */ a = x * x;/* a stored in register */ b = y * y;/* b as well */ c = a*a*a + b*b + a * b;/* used later */ d = a * a * c;/* used later */ p = &a;/* p gets address of a */ q = &b/* q gets address of b */ e = f(p, q)/* function call */ Enforces consistency on groups of operations Limits the time when consistency holds Having inconsistent memory is not new – compilers have been doing it for long !!!

Weak Consistency - Example a)A valid sequence of events for weak consistency. b)An invalid sequence for weak consistency.

Release Consistency In weak consistency when synchronization is called, the data store does not know whether it is the end of write or beginning of read Release consistency provides two kinds of synchronization operations – Acquire and Release Guarantees that at when acquire is invoked local copies are up-to-date When a release is done changes are propagated

Release Consistency-Rules Before a read or write operation on shared data is performed, all previous acquires done by the process must have completed successfully. Before a release is allowed to be performed, all previous reads and writes by the process must have completed Accesses to synchronization variables are FIFO consistent (sequential consistency is not required).

Types of Release Consistencies Eager release consistency –A process invoking release pushes out all the modified data to all other copies –Conservative approach –Expensive Lazy release –Nothing is pushed out at the time of release –When a process invokes “acquire”, it gets the latest values from processes holding them –Efficient

Entry Consistency (1) An acquire access of a synchronization variable is not allowed to perform with respect to a process until all updates to the guarded shared data have been performed with respect to that process. Before an exclusive mode access to a synchronization variable by a process is allowed to perform with respect to that process, no other process may hold the synchronization variable, not even in nonexclusive mode. After an exclusive mode access to a synchronization variable has been performed, any other process's next nonexclusive mode access to that synchronization variable may not be performed until it has performed with respect to that variable's owner.

Entry Consistency (1) A valid event sequence for entry consistency.

Summary of Consistency Models a)Consistency models not using synchronization operations. b)Models with synchronization operations. ConsistencyDescription StrictAbsolute time ordering of all shared accesses matters. Linearizability All processes must see all shared accesses in the same order. Accesses are furthermore ordered according to a (nonunique) global timestamp Sequential All processes see all shared accesses in the same order. Accesses are not ordered in time CausalAll processes see causally-related shared accesses in the same order. FIFO All processes see writes from each other in the order they were used. Writes from different processes may not always be seen in that order (a) ConsistencyDescription WeakShared data can be counted on to be consistent only after a synchronization is done ReleaseShared data are made consistent when a critical region is exited EntryShared data pertaining to a critical region are made consistent when a critical region is entered. (b)

Client-Centric Consistency Models Consistency models discussed till now assumes that there can be concurrent writes However, there are applications where concurrent writes do not happen or happen very rarely Examples: DNS, World Wide Web Simpler consistency models suffice for these applications –Eventual consistency –Monotonic reads –Monotonic writes

Eventual Consistency The principle of a mobile user accessing different replicas of a distributed database.

Monotonic Reads The read operations performed by a single process P at two different local copies of the same data store. a)A monotonic-read consistent data store b)A data store that does not provide monotonic reads.

Monotonic Writes The write operations performed by a single process P at two different local copies of the same data store a)A monotonic-write consistent data store. b)A data store that does not provide monotonic-write consistency.

Read Your Writes a)A data store that provides read-your-writes consistency. b)A data store that does not.

Writes Follow Reads a)A writes-follow-reads consistent data store b)A data store that does not provide writes-follow-reads consistency

Replica Placement The logical organization of different kinds of copies of a data store into three concentric rings.

Server-Initiated Replicas Counting access requests from different clients.

Pull versus Push Protocols A comparison between push-based and pull-based protocols in the case of multiple client, single server systems. IssuePush-basedPull-based State of serverList of client replicas and cachesNone Messages sentUpdate (and possibly fetch update later)Poll and update Response time at client Immediate (or fetch-update time)Fetch-update time