Consistency and Replication Chapter 6. Object Replication (1) Organization of a distributed remote object shared by two different clients.

Презентация:



Advertisements
Похожие презентации
HPC Pipelining Parallelism is achieved by starting to execute one instruction before the previous one is finished. The simplest kind overlaps the execution.
Advertisements

© 2005 Cisco Systems, Inc. All rights reserved. BGP v Customer-to-Provider Connectivity with BGP Connecting a Multihomed Customer to Multiple Service.
Loader Design Options Linkage Editors Dynamic Linking Bootstrap Loaders.
Lecture # Computer Architecture Computer Architecture = ISA + MO ISA stands for instruction set architecture is a logical view of computer system.
© 2009 Avaya Inc. All rights reserved.1 Chapter Two, Voic Pro Components Module Two – Actions, Variables & Conditions.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v BGP Overview Understanding BGP Path Attributes.
© 2009 Avaya Inc. All rights reserved.1 Chapter Four, UMS Web Services Module Three – Exchange 2007.
Michael Marchenko. In mathematics, a sequence is an ordered list of objects (or events). Like a set, it contains members (also called elements, or terms),
SPLAY TREE The basic idea of the splay tree is that every time a node is accessed, it is pushed to the root by a series of tree rotations. This series.
© 2006 Cisco Systems, Inc. All rights reserved. MPLS v Complex MPLS VPNs Introducing Central Services VPNs.
© 2006 Cisco Systems, Inc. All rights reserved. BSCI v Implementing BGP Explaining BGP Concepts and Terminology.
Operator Overloading Customised behaviour of operators Chapter: 08 Lecture: 26 & 27 Date:
© 2005 Cisco Systems, Inc. All rights reserved. BGP v Route Selection Using Policy Controls Using Multihomed BGP Networks.
© 2003, Cisco Systems, Inc. All rights reserved. CSPFA Chapter 3 Cisco PIX Firewall Technology and Features.
DEPTH FIRST TRAVERSAL Lesson Plan -2. Evocation Traverse Graph All vertices in graph must to traverse A vertex in graph have multiple parents, traversal.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v Route Selection Using Policy Controls Applying Route-Maps as BGP Filters.
© 2005 Cisco Systems, Inc. All rights reserved.INTRO v Ensuring the Reliability of Data Delivery Establishing a TCP Connection.
Sequences Sequences are patterns. Each pattern or number in a sequence is called a term. The number at the start is called the first term. The term-to-term.
© 2009 Avaya Inc. All rights reserved.1 Chapter Nine, Voic Pro in SCN Module Four – Distributed Voic Pro.
11 BASIC DRESS-UP FEATURES. LESSON II : DRESS UP FEATURES 12.
Транксрипт:

Consistency and Replication Chapter 6

Object Replication (1) Organization of a distributed remote object shared by two different clients.

Object Replication (2) a)A remote object capable of handling concurrent invocations on its own. b)A remote object for which an object adapter is required to handle concurrent invocations

Object Replication (3) a)A distributed system for replication-aware distributed objects. b)A distributed system responsible for replica management

Data-Centric Consistency Models The general organization of a logical data store, physically distributed and replicated across multiple processes.

Strict Consistency Behavior of two processes, operating on the same data item. A strictly consistent store. A store that is not strictly consistent.

Linearizability and Sequential Consistency (1) a)A sequentially consistent data store. b)A data store that is not sequentially consistent.

Linearizability and Sequential Consistency (2) Three concurrently executing processes. Process P1Process P2Process P3 x = 1; print ( y, z); y = 1; print (x, z); z = 1; print (x, y);

Linearizability and Sequential Consistency (3) Four valid execution sequences for the processes of the previous slide. The vertical axis is time. x = 1; print ((y, z); y = 1; print (x, z); z = 1; print (x, y); Prints: Signature: (a) x = 1; y = 1; print (x,z); print(y, z); z = 1; print (x, y); Prints: Signature: (b) y = 1; z = 1; print (x, y); print (x, z); x = 1; print (y, z); Prints: Signature: (c) y = 1; x = 1; z = 1; print (x, z); print (y, z); print (x, y); Prints: Signature: (d)

Casual Consistency (1) Necessary condition: Writes that are potentially casually related must be seen by all processes in the same order. Concurrent writes may be seen in a different order on different machines.

Casual Consistency (2) This sequence is allowed with a casually-consistent store, but not with sequentially or strictly consistent store.

Casual Consistency (3) a)A violation of a casually-consistent store. b)A correct sequence of events in a casually-consistent store.

FIFO Consistency (1) Necessary Condition: 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.

FIFO Consistency (2) A valid sequence of events of FIFO consistency

FIFO Consistency (3) Statement execution as seen by the three processes from the previous slide. The statements in bold are the ones that generate the output shown. x = 1; print (y, z); y = 1; print(x, z); z = 1; print (x, y); Prints: 00 (a) x = 1; y = 1; print(x, z); print ( y, z); z = 1; print (x, y); Prints: 10 (b) y = 1; print (x, z); z = 1; print (x, y); x = 1; print (y, z); Prints: 01 (c)

FIFO Consistency (4) Two concurrent processes. Process P1Process P2 x = 1; if (y == 0) kill (P2); y = 1; if (x == 0) kill (P1);

Weak Consistency (1) Properties: Accesses to synchronization variables associated with a data store are sequentially consistent No operation on a synchronization variable is allowed to be performed until all previous writes have been 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.

Weak Consistency (2) 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 */

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

Release Consistency (1) A valid event sequence for release consistency.

Release Consistency (2) 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).

Entry Consistency (1) Conditions: 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)

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

Remote-Write Protocols (1) Primary-based remote-write protocol with a fixed server to which all read and write operations are forwarded.

Remote-Write Protocols (2) The principle of primary- backup protocol.

Local-Write Protocols (1) Primary-based local-write protocol in which a single copy is migrated between processes.

Local-Write Protocols (2) Primary-backup protocol in which the primary migrates to the process wanting to perform an update.

Active Replication (1) The problem of replicated invocations.

Active Replication (2) a)Forwarding an invocation request from a replicated object. b)Returning a reply to a replicated object.

Quorum-Based Protocols Three examples of the voting algorithm: a)A correct choice of read and write set b)A choice that may lead to write-write conflicts c)A correct choice, known as ROWA (read one, write all)

Orca A simplified stack object in Orca, with internal data and two operations. OBJECT IMPLEMENTATION stack; top: integer;# variable indicating the top stack: ARRAY[integer 0..N-1] OF integer# storage for the stack OPERATION push (item: integer)# function returning nothing BEGIN GUARD top < N DO stack [top] := item;# push item onto the stack top := top + 1;# increment the stack pointer OD; END; OPERATION pop():integer;# function returning an integer BEGIN GUARD top > 0 DO# suspend if the stack is empty top := top – 1;# decrement the stack pointer RETURN stack [top];# return the top item OD; END; BEGIN top := 0;# initialization END;

Management of Shared Objects in Orca Four cases of a process P performing an operation on an object O in Orca.

Casually-Consistent Lazy Replication The general organization of a distributed data store. Clients are assumed to also handle consistency-related communication.

Processing Read Operations Performing a read operation at a local copy.

Processing Write Operations Performing a write operation at a local copy.