Consistency protocols
Speaker :呂宗螢
Adviser :梁文耀 老師
Date : 2006/11/29
Embedded and Parallel Systems Lab2
Consistency Protocols
 Implementation of a consistency model
How do we order operations according to a
consistency model
How are multiple writes applied and
propagated to different replicas?
 Data-consistency protocols
Implement data-consistency model
Need some sort of globally serialized
operations
Embedded and Parallel Systems Lab3
Consistency Protocols
 Primary-based protocols
Each data item has a primary replica
 Replication-based protocols
Operations can be carried out at multiple
replicas
Embedded and Parallel Systems Lab4
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 Lab5
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 Lab6
Remote-Write Protocols
Embedded and Parallel Systems Lab7
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 Lab8
Primary-Backup Protocols
Embedded and Parallel Systems Lab9
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 Lab10
Local-Write Protocols
 Primary-base local-write protocols
There is only a single copy of data item x.
 Where is the data? How to find?
Forwarding pointers
Home-based
 Primary-backup local-write protocols
Multiple copies of each data item x exist, but
one of them are primary
Can disconnected mode
Embedded and Parallel Systems Lab11
Primary-base local-write protocols
Embedded and Parallel Systems Lab12
Primary-backup local-write
protocols
Embedded and Parallel Systems Lab13
Replicated-Write Protocols
 Write operations can be carried out at
multiple replicas instead of only one
 Active Replication
Write operation is forwarded to all replicas
Need a total ordering
Use Lamport timestamps
Central sequencer
One problem to deal with replicated
invocations
Embedded and Parallel Systems Lab14
Replicated Invocations
Embedded and Parallel Systems Lab15
Replicated Invocations
(one solution)
 Mazouni et al., 1995
Embedded and Parallel Systems Lab16
Replicated-Write Protocols
 Quorum-Based Protocols
Voting protocols
Gifford ,1979
In 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 Lab17
Quorum-Based Protocols
Embedded and Parallel Systems Lab18
Home-Based
 The home location is often chosen to be
the place where an entity was created
 Use Home agent
Embedded and Parallel Systems Lab19
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

Consistency protocols

  • 1.
    Consistency protocols Speaker :呂宗螢 Adviser:梁文耀 老師 Date : 2006/11/29
  • 2.
    Embedded and ParallelSystems Lab2 Consistency Protocols  Implementation of a consistency model How do we order operations according to a consistency model How are multiple writes applied and propagated to different replicas?  Data-consistency protocols Implement data-consistency model Need some sort of globally serialized operations
  • 3.
    Embedded and ParallelSystems Lab3 Consistency Protocols  Primary-based protocols Each data item has a primary replica  Replication-based protocols Operations can be carried out at multiple replicas
  • 4.
    Embedded and ParallelSystems Lab4 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
  • 5.
    Embedded and ParallelSystems Lab5 Remote-Write Protocols  All read and Write operations are carried out at a remote server.  Client-server systems  Primary-backup protocols
  • 6.
    Embedded and ParallelSystems Lab6 Remote-Write Protocols
  • 7.
    Embedded and ParallelSystems Lab7 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
  • 8.
    Embedded and ParallelSystems Lab8 Primary-Backup Protocols
  • 9.
    Embedded and ParallelSystems Lab9 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
  • 10.
    Embedded and ParallelSystems Lab10 Local-Write Protocols  Primary-base local-write protocols There is only a single copy of data item x.  Where is the data? How to find? Forwarding pointers Home-based  Primary-backup local-write protocols Multiple copies of each data item x exist, but one of them are primary Can disconnected mode
  • 11.
    Embedded and ParallelSystems Lab11 Primary-base local-write protocols
  • 12.
    Embedded and ParallelSystems Lab12 Primary-backup local-write protocols
  • 13.
    Embedded and ParallelSystems Lab13 Replicated-Write Protocols  Write operations can be carried out at multiple replicas instead of only one  Active Replication Write operation is forwarded to all replicas Need a total ordering Use Lamport timestamps Central sequencer One problem to deal with replicated invocations
  • 14.
    Embedded and ParallelSystems Lab14 Replicated Invocations
  • 15.
    Embedded and ParallelSystems Lab15 Replicated Invocations (one solution)  Mazouni et al., 1995
  • 16.
    Embedded and ParallelSystems Lab16 Replicated-Write Protocols  Quorum-Based Protocols Voting protocols Gifford ,1979 In 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)
  • 17.
    Embedded and ParallelSystems Lab17 Quorum-Based Protocols
  • 18.
    Embedded and ParallelSystems Lab18 Home-Based  The home location is often chosen to be the place where an entity was created  Use Home agent
  • 19.
    Embedded and ParallelSystems Lab19 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