2. Consistency Models
Types:
• Strict Consistency Model
• Sequential Consistency Model
• Causal Consistency Model
• Pipelined Random Access Memory Consistency Model
• Processor Consistency Model
• Weak Consistency Model
• Release Consistency Model
3. Strict Consistency Model
• Strongest Form of Memory Coherence
• Value returned by read = Value written by write
• All writes become visible instantaneously
• Implementation requires absolute global time
• Absolute synchronization of clock is not possible
• Implementation is practically impossible
• The ordering of operation is not changeable.
4. Sequential Consistency Model
• Proposed by Lamport [1979]
• All processes in same order support this model
• Exact order of access operations are interleaved does not matter
• If the three operations read(r1), write(w1), read(r2) are performed in that order
• (r1, w1, r2), (r1, r2, w1), (w1, r1, r2), (w1, r2, r1), (r2, r1, w1), (r2, w1, r1) any of
the ordereing is acceptable
• Consistency requirement is weak compared to Strict model
• Provide One Copy/ Single Copy semantics
• Accepted by most of the applications
5. Causal Consistency Model
• Proposed by Hutto and Ahamad (1990)
• All processes see memory reference operations in correct order that
are potentially causally related
• Memory Operation not related can be seen by different processes
• Memory reference operation is related to another memory reference
operation if one might have been influenced by the other
• Maintaining dependency graphs for memory access operations
6. Pipelined Random Access Memory
Consistency Model
• Proposed by Lipton and Sandberg (1988)
• Provides a weaker consistency semantics than the consistency model
• Ensures that all write operations performed by a single process are seen by all
other processes in the order they performed
• All write operations performed by a single process are in a pipeline
• Write operations performed by different processes can be seen by different
processes in different order
• Simple and easy to implement and also has good performance
• PRAM consistency all processes do not agree on the same order of memory
reference operations
7. Processor Consistency Model
• Proposed by Goodman [1989]
• Very similar to PRAM model with additional restriction of memory
coherence
• Memory coherence - for any memory location all processes agree on
the same order of all write operations performed on the same
memory location
8. Weak Consistency Model
• Proposed by Dubois [1988]
• Common characteristics
• It is not necessary to show the change in memory done by every write operation to other
processes
• Isolated accesses to shared variable are rare
• Better performance can be achieved on a group of memory reference operations
• uses a special variable called a synchronization variable
• All accesses to synchronization variables must obey sequential consistency semantics
• Write operations must be completed before an access to a synchronization variable
• All previous accesses to synchronization variables must be completed before access to a non-
synchronization variable
9. Release Consistency Model (Contd…)
• Requirement to Implement
• All accesses to acquire and release synchronization variable obey processor
consistency semantics
• All previous acquires perform by a process must be completed successfully
before the process is allowed to perform a data access operation on the
memory
• All previous data access operations performed by a process must be
completed successfully before a release access done by the process is allowed
10. Implementing Sequential Consistency Model
• Most commonly used model
• Protocols depends on Replication and Migration of data blocks
• Strategies
• Nonreplicated, Nonmigrating blocks (NRNMB)
• Nonreplicated, migrating blocks (NRMB)
• Replicated, migrating blocks (RMB)
• Replicated, Nonmigrating blocks (RNMB)
12. • Enforcing sequential consistency is simple
• Drawback
• Serializing data access creates a bottleneck
• Parallelism is not possible
• Data Location
• There is a single copy of each block in the entire system
• The location of a block never changes
• Hence use Mapping Function
NRNMB Strategy (Contd…)
13. NRMB Strategy
• Each block of the shared memory has a single copy
• Only the processes executing on one node can read or write a given
data item at any one time
14. NRMB Strategy (contd…)
• Advantage
• No communication Cost
• Data Access Locality
• Drawback
• Thrashing Occurs
• Parallelism is not possible
15. NRMB Strategy (contd…)
• Data Location
• Broadcasting
• Centralized Server algorithm
• Fixed Distributed Server algorithm
• Dynamic Distributed Server algorithm
16. NRMB Strategy (contd…)
• Broadcasting
• Each node maintains an owned blocks table that contains an entry for each
block for which the node is the current owner
17. NRMB Strategy (contd…)
• Centralized Server Algorithm
• A centralized server maintains a block table that contains the location
information for all block in the shared memory space
• Drawbacks
• A centralized server serializes location queries, reducing parallelism
• The failure of the centralized server will cause the DSM system to stop
functioning
19. NRMB Strategy (contd…)
• Fixed Distributed Server algorithm
• Extension of the centralized server scheme
• It overcomes the drawbacks of the centralized server scheme by distributing
the role of the centralized server
• Whenever a fault occurs, the mapping functions is used by the fault handler
of the faulting node to find out the node whose block manager is mapping
the currently accessed block
21. NRMB Strategy (contd…)
• Dynamic Distributed Server algorithm
• Does not use any block manager
• Each node has a block table that contains the ownership information for all
block
• A field gives a hint on the location of the owner of a block – probable owner
• When fault occurs, the faulting node extracts the node information
31. RNMB Strategy (Contd…)
• Can be replicated at multiple nodes
• Location of each replica is fixed
• Replicas are kept consistent
• Updating them in all cases
• Sequential consistency is ensured by global sequencer
32. RNMB Strategy
• Data Location
• The replica location of a block never change
• All replicas of a data block are kept consistent
• Only a read request can be directly send to one of the node having a replica.