University of Gondar
University of Gondar
College of informatics
Department of information technology
Distributed system assignment
Consistency Model
A consistency model is contract between a distributed data store and processes, in which the
processes agree to obey certain rules in contrast the store promises to work correctly.
A consistency model basically refers to the degree of consistency that should be maintained
for the shared memory data.
If a system supports the stronger consistency model, then the weaker consistency model is
automatically supported but the converse is not true.
The types of consistency models are Data-Centric and client centric consistency models.
Any read on a data item X returns a value corresponding to the result of the most recent write
on X
This is the strongest form of memory coherence which has the most stringent consistency
requirement.
Strict consistency is the ideal model but it is impossible to implement in a distributed system. It
is based on absolute global time or a global agreement on commitment of changes.
Example:
Begin with:
In entry consistency every shared data item is associated with a synchronization variable.
In order to access consistent data, each synchronization variable must be explicitly acquired.
Release consistency affects all shared data but entry consistency affects only those shared
data associated with a synchronization variable.
B.Client-centric model:
These consistency model do not handle simultaneous updates.
But, to maintain a consistent view for the individual client process to access different replicas from
different locations has been carried out.
1.Monotonic Reads
If a process reads the value of a data item x, any successive read
operation on x by that process will always return that same or a more
recent value.
o Monotonic-read consistency guarantees that if a process has
seen a value of x at time t, it will never see an older version of x
at a later time.
Example:
o The read operations performed by a single process P at two
different local copies of the same data store.
o Vertical axis - two different local copies of the data store are
shown - L1 and L2
o Time is shown along the horizontal axis
o Operations carried out by a single process P in boldface are
connected by a dashed line representing the order in which
they are carried out.
(a) A monotonic-read consistent data store.
2.Monotonic Writes
In a monotonic-write consistent store, the following condition holds:
A write operation by a process on a data item x is completed
before any successive write operation on x by the same
process.
Hence: A write operation on a copy of item x is performed only if that
copy has been brought up to date by means of any preceding write
operation, which may have taken place on other copies of x. If need
be, the new write must wait for old ones to finish.
Example:
The write operations performed by a single process P at two different
local copies of the same data store.
A monotonic-write consistent data store.
o
3.Read Your Writes
A client-centric consistency model that is closely related to
monotonic reads is as follows. A data store is said to provide read-
your-writes consistency, if the following condition holds:
The effect of a write operation by a process on data item x will
always be seen by a successive read operation on x by the
same process.
Hence: a write operation is always completed before a successive
read operation by the same process, no matter where that read
operation takes place.
Example:
A data store that provides read-your-writes consistency.