consistency protocols
DESCRIPTION
Consistency protocolsTRANSCRIPT
Consistency protocols
Speaker:呂宗螢Adviser:梁文耀 老師Date : 2006/11/29
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
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
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
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
Embedded and Parallel Systems Lab
6
Remote-Write 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
Embedded and Parallel Systems Lab
8
Primary-Backup 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
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
Embedded and Parallel Systems Lab
11
Primary-base local-write protocols
Embedded and Parallel Systems Lab
12
Primary-backup local-write 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
Embedded and Parallel Systems Lab
14
Replicated Invocations
Embedded and Parallel Systems Lab
15
Replicated Invocations (one solution)
Mazouni et al., 1995
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)
Embedded and Parallel Systems Lab
17
Quorum-Based 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
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