consistency protocols

19
Consistency protocols Speaker 呂呂呂 Adviser 呂呂呂 呂呂 Date 2006/11/29

Upload: zongying-lyu

Post on 23-Jun-2015

144 views

Category:

Software


1 download

DESCRIPTION

Consistency protocols

TRANSCRIPT

Page 1: Consistency protocols

Consistency protocols

Speaker:呂宗螢Adviser:梁文耀 老師Date : 2006/11/29

Page 2: Consistency protocols

Embedded and Parallel Systems Lab

2

Consistency Protocols

Implementation of a consistency modelHow do we order operations according to a

consistency modelHow are multiple writes applied and

propagated to different replicas? Data-consistency protocols

Implement data-consistency modelNeed some sort of globally serialized

operations

Page 3: Consistency protocols

Embedded and Parallel Systems Lab

3

Consistency Protocols

Primary-based protocolsEach data item has a primary replica

Replication-based protocolsOperations can be carried out at multiple

replicas

Page 4: Consistency protocols

Embedded and Parallel Systems Lab

4

Primary-based Protocol

Each data item has a primary replica All writes are applied to and coordinated

by the primary Two types:

Remote-Write : The primary is fixed and remote

Local-Write : The primary is copied locally before applying writes

Page 5: Consistency protocols

Embedded and Parallel Systems Lab

5

Remote-Write Protocols

All read and Write operations are carried out at a remote server.

Client-server systems

Primary-backup protocols

Page 6: Consistency protocols

Embedded and Parallel Systems Lab

6

Remote-Write Protocols

Page 7: Consistency protocols

Embedded and Parallel Systems Lab

7

Primary-Backup Protocols

Budhiraja et al., 1993 Read operations can happen locally Write operations also carried out on the

primary A write is complete only when all backups

have updated Update is Blocking

Page 8: Consistency protocols

Embedded and Parallel Systems Lab

8

Primary-Backup Protocols

Page 9: Consistency protocols

Embedded and Parallel Systems Lab

9

Primary-Backup Protocols

Primary can order all incoming writes All processes are see all write operations in the

same order Sequential consistency Can use write-invalidate Update with Non-blocking(Budhiraja and

Marzullo, 1992) No assurance that the backups will actually receive

the write Not guaranteed that the effect of a write will be seen

in all subsequent reads

Page 10: Consistency protocols

Embedded and Parallel Systems Lab

10

Local-Write Protocols

Primary-base local-write protocolsThere is only a single copy of data item x.

Where is the data? How to find?Forwarding pointersHome-based

Primary-backup local-write protocolsMultiple copies of each data item x exist, but

one of them are primaryCan disconnected mode

Page 11: Consistency protocols

Embedded and Parallel Systems Lab

11

Primary-base local-write protocols

Page 12: Consistency protocols

Embedded and Parallel Systems Lab

12

Primary-backup local-write protocols

Page 13: Consistency protocols

Embedded and Parallel Systems Lab

13

Replicated-Write Protocols

Write operations can be carried out at multiple replicas instead of only one

Active ReplicationWrite operation is forwarded to all replicasNeed a total ordering

Use Lamport timestampsCentral sequencer

One problem to deal with replicated invocations

Page 14: Consistency protocols

Embedded and Parallel Systems Lab

14

Replicated Invocations

Page 15: Consistency protocols

Embedded and Parallel Systems Lab

15

Replicated Invocations (one solution)

Mazouni et al., 1995

Page 16: Consistency protocols

Embedded and Parallel Systems Lab

16

Replicated-Write Protocols

Quorum-Based ProtocolsVoting protocolsGifford ,1979In a system where N replicas exist, a client

needs to assemble a read quorum of NR servers to read, and a write quorum of NW servers to write, where

NR+NW > N (prevents read-write conflicts)

NW > N/2 (prevents write-write conflicts)

Page 17: Consistency protocols

Embedded and Parallel Systems Lab

17

Quorum-Based Protocols

Page 18: Consistency protocols

Embedded and Parallel Systems Lab

18

Home-Based

The home location is often chosen to be the place where an entity was created

Use Home agent

Page 19: Consistency protocols

Embedded and Parallel Systems Lab

19

Home-Based

Client’s location

Host’s home agent

3.Tunnel packet to current location

4.Send successive packets to current location

1.Send packet to host at its home

2.Return address current location