2. 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
3. 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
4. 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
5. 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
7. 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
9. 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
10. 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
13. 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
15. Embedded and Parallel Systems Lab15
Replicated Invocations
(one solution)
Mazouni et al., 1995
16. 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)
18. 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
19. 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