SlideShare a Scribd company logo
10
Most read
20
Most read
23
Most read
Parallel and distributed
computing
OUTLINE
Consistency Model
Consistency Model
Example:
• Assume that the following case occurs:
• The row X is replicated on nodes M and N
• The client A writes row X to node M
• After a period of time t, client B reads row X from node N
• The consistency model determines whether client B will
definitely see the write performed by client A, will definitely
not, or cannot depend on seeing the write.
Conflicting operations
• Read-write conflict: a read operation and a write operation act
concurrently
• Write-Write conflict: two concurrent write operation
Reasons for replication
Two primary reasons for replicating data
reliability and performance
However there is price to be paid when data is replicated
The problem is with replication that having multiple
copies may lead to consistency model i.e. when copy is
modified that copy becomes difference from the rest
Reasons for replication
Therefore modifications have to be caried out on all
copies to ensure consistency.
Exactly how and when those modifications need to
be carried out determines the price of replication.
Consistency Model
• Provides formal view of how memory system will appears to programmer
• Eliminates the gap between the behavior expected by the programmer
and actual behavior supported by the system
• It is used for contract between software and memory
• It says that if the software agrees to obey certain rule then the memory
promise to work properly
• Memory consistence model for shared address space specifies that in
which memory operations must appear to be performed i.e. visible to
processors with respect to one other.
Consistency Model
Consistency is different from coherence.
Coherence deals with maintaining a global order in
which writes to a single location or single variable are
seen by all processors i.e. how memory accesses are
coordinated among CPUs.
Consistency deals with the ordering of operations to
multiple locations with respect to all processors. i.e. when
memory writes shows up at another CPU.
Consistency Model
Consistency models define rules for the apparent order
and visibility of updates. There are two methods to
define and a categorize consistency models
1. issue: describes the restrictions that define how a
process can issue operations
2. View: defines the order of operations visible to
processes.
Consistency Model
•Consistency Model:
•Data Centric Consistency Model
•Client Centric Consistency Model
Consistency Models
1. Strict Consistency Model
2. Sequential Consistency Model
3. Causal Consistency Model
4. PRAM and Processor
5. Weak Consistency Model
6. Eventual Consistency Model
7. Release Consistency Model
Strict Consistency Model
1. It Is most strongest consistency model, i.e. model of rules
2. A write to a variable by any processor needs to be seen
instantaneously by all processors.
3. It is defined by following conditions
4. Any read to memory location x returns the value stored by the most
recent write operation of x
5. Disadvantage: number of messages increase between processors, as
single write operation may need to update on all processors
6. We can’t implement this model in all scenario.
7. It doesn't help in answering the question of conflict resolution in
concurrent writes to the same data item, because it assumes
concurrent writes to be impossible
Sequential Consistency Model
1. It is weaker memory model than strict consistency
model.
2. It is the most intuitive (with out conscious) model
greatly restrict the use of the many performance,
optimization used by the uniprocessor hardware and
compiler designers
3. Results of any execution is same as if the operations of
all the processors were executed in some sequential
order and the operations of each individual process
appears in the sequence in order specified by its
program
Sequential Consistency Model
1. Note that this rule says nothing about what order the
events happen in
2. Just that happen in some order
3. All instructions are executed atomically and there are no
recording between memory instructions
4. This is simple model however performance can’t be at
its best
5. One difficulty to bring all operations execute in
sequential order.
Sequential vs strict Consistency model
Causal consistency model
1. It represents a weaking of sequential consistency
2. It makes a distinguish between events that are
potentially causally related to and those are not.
3. Condition: writes that are potentially causally
related must be seen by all processing the same
order.
4. Operations are said to related to another if one
might have bee influenced by other operations
5. Operations that are not causally related are said to
be concurrent.
Causal Consistency Model
Weak consistency model
1. Not necessary to show the change in memory done by
every write operations to other processes. E.g. when a
process executes in a critical sections.
2. Process to synchronization variables are sequentially
consistent
3. No access to a synchronization variable allowed to
perform until all previous writes are complete every
where.
4. No data access write/read is allowed to be performed
until all process synchronize variables has been
performed
Eventual Consistency Model
• Based on client centric Model
• Many system: one or few processes perform updates, how frequently
these updates be made available to other read-only process.
• Examples: NIS (News information service), user information database,
only system admin update database, users only read data.
• Only naming authority allowed updates (hence no write-write
conflicts)
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 value or a
more recent value.
• Once read, subsequent reads on that data items return same or more
recent values.
• Example: Each time you connect to a different email server, the
server fletches all the updates form the server you previously visited.
• Example: automatically reading you personal calendar updates from
different servers. Monotonic reads guarantees that the user see all
updates, no matter from which server the automatic reading takes
place.
Monotonic Write
A write operation by a process on a data item x is completed
before any successive write operation on x by the same
process.
a write must be propagated to all replicas before a successive
write by the same process
Example: Updating a program at server S2, And ensuring that
all components on which compilation and linking depends are
also placed at S2.
Example: maintaining versions of replicated files in the correct
order everywhere (Propagate the previous version to the
server where the newest version is installed)
PRAM (Pipelined RAM) consistency model
1. Weaker consistency model so for
2. Only write operations is considers
3. Writes done by a single processor are received by all the
other processors in the order in which they were issued
4. Writes generates by different processors are concurrent.
5. Write operations performed by single process are in
pipelined
6. Simple and easy to implement
7. Also called as FIFO Consistency Model
Released Consistency Model
1. Enhancement of weak consistency model. In which
operations are performed in a synchronized way.
2. Use of two synchronization variables
a) Acquire(use to tell system is entering)
b) Release(use to tell system is just exited)

More Related Content

DOCX
MC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DE
PPTX
Replication in Distributed Systems
PPT
ds7_con.ppt
PPT
Chapter 6-Consistency and Replication.ppt
PDF
parallel Questions & answers
PPTX
Ch-7-Part-2-Distributed-System.pptx
PDF
Consistency of data replication
PPT
Client Centric Consistency Model
MC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DE
Replication in Distributed Systems
ds7_con.ppt
Chapter 6-Consistency and Replication.ppt
parallel Questions & answers
Ch-7-Part-2-Distributed-System.pptx
Consistency of data replication
Client Centric Consistency Model

Similar to Parallel and Distributed Computing Chapter 6 (20)

PPTX
Chapter Introductionn to distributed system .pptx
PPT
This is introduction to distributed systems for the revised curiculum
PPT
chen-06.ppt
DOCX
Process synchronizationfinal
PPT
Operating-System-10 for ph.d teachi.ppt
PDF
DC_M5_L2_Data Centric Consistency (1).pdf
PPT
Multithreading in java programming language.ppt
DOCX
Processscheduling 161001112521
DOCX
Processscheduling 161001112521
PPTX
DS CH6 7 8 - SYNCH CR FT BSc Present - 2024.pptx
PPTX
Lec 4 (program and network properties)
PDF
Cs556 section2
PPTX
Cc module 3.pptx
PDF
11 Distributrd Systems and parallel systems_Chapter 18
PPTX
Chapter 6 Concurrency: Deadlock and Starvation
DOCX
Processscheduling 161001112521
PDF
1844 1849
PDF
1844 1849
PPTX
Real-Time Design Patterns
PPT
programnetwork_properties-parallelism_ch2.ppt
Chapter Introductionn to distributed system .pptx
This is introduction to distributed systems for the revised curiculum
chen-06.ppt
Process synchronizationfinal
Operating-System-10 for ph.d teachi.ppt
DC_M5_L2_Data Centric Consistency (1).pdf
Multithreading in java programming language.ppt
Processscheduling 161001112521
Processscheduling 161001112521
DS CH6 7 8 - SYNCH CR FT BSc Present - 2024.pptx
Lec 4 (program and network properties)
Cs556 section2
Cc module 3.pptx
11 Distributrd Systems and parallel systems_Chapter 18
Chapter 6 Concurrency: Deadlock and Starvation
Processscheduling 161001112521
1844 1849
1844 1849
Real-Time Design Patterns
programnetwork_properties-parallelism_ch2.ppt
Ad

More from AbdullahMunir32 (20)

PDF
Mobile Application Development-Lecture 15 & 16.pdf
PDF
Mobile Application Development-Lecture 13 & 14.pdf
PDF
Mobile Application Development -Lecture 11 & 12.pdf
PDF
Mobile Application Development -Lecture 09 & 10.pdf
PDF
Mobile Application Development -Lecture 07 & 08.pdf
PDF
Mobile Application Development Lecture 05 & 06.pdf
PDF
Mobile Application Development-Lecture 03 & 04.pdf
PDF
Mobile Application Development-Lecture 01 & 02.pdf
PDF
Parallel and Distributed Computing Chapter 13
PDF
Parallel and Distributed Computing Chapter 12
PDF
Parallel and Distributed Computing Chapter 11
PDF
Parallel and Distributed Computing Chapter 10
PDF
Parallel and Distributed Computing Chapter 9
PDF
Parallel and Distributed Computing Chapter 8
PDF
Parallel and Distributed Computing Chapter 7
PDF
Parallel and Distributed Computing Chapter 5
PDF
Parallel and Distributed Computing Chapter 4
PDF
Parallel and Distributed Computing chapter 3
PDF
Parallel and Distributed Computing Chapter 2
PDF
Parallel and Distributed Computing chapter 1
Mobile Application Development-Lecture 15 & 16.pdf
Mobile Application Development-Lecture 13 & 14.pdf
Mobile Application Development -Lecture 11 & 12.pdf
Mobile Application Development -Lecture 09 & 10.pdf
Mobile Application Development -Lecture 07 & 08.pdf
Mobile Application Development Lecture 05 & 06.pdf
Mobile Application Development-Lecture 03 & 04.pdf
Mobile Application Development-Lecture 01 & 02.pdf
Parallel and Distributed Computing Chapter 13
Parallel and Distributed Computing Chapter 12
Parallel and Distributed Computing Chapter 11
Parallel and Distributed Computing Chapter 10
Parallel and Distributed Computing Chapter 9
Parallel and Distributed Computing Chapter 8
Parallel and Distributed Computing Chapter 7
Parallel and Distributed Computing Chapter 5
Parallel and Distributed Computing Chapter 4
Parallel and Distributed Computing chapter 3
Parallel and Distributed Computing Chapter 2
Parallel and Distributed Computing chapter 1
Ad

Recently uploaded (20)

PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
Open Quiz Monsoon Mind Game Prelims.pptx
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PPTX
Onica Farming 24rsclub profitable farm business
PPTX
Introduction and Scope of Bichemistry.pptx
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
Pharma ospi slides which help in ospi learning
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
From loneliness to social connection charting
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PDF
English Language Teaching from Post-.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Pre independence Education in Inndia.pdf
PDF
Piense y hagase Rico - Napoleon Hill Ccesa007.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
human mycosis Human fungal infections are called human mycosis..pptx
Open Quiz Monsoon Mind Game Prelims.pptx
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
Onica Farming 24rsclub profitable farm business
Introduction and Scope of Bichemistry.pptx
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Pharma ospi slides which help in ospi learning
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Week 4 Term 3 Study Techniques revisited.pptx
STATICS OF THE RIGID BODIES Hibbelers.pdf
Renaissance Architecture: A Journey from Faith to Humanism
From loneliness to social connection charting
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
English Language Teaching from Post-.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Pre independence Education in Inndia.pdf
Piense y hagase Rico - Napoleon Hill Ccesa007.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?

Parallel and Distributed Computing Chapter 6

  • 3. Consistency Model Example: • Assume that the following case occurs: • The row X is replicated on nodes M and N • The client A writes row X to node M • After a period of time t, client B reads row X from node N • The consistency model determines whether client B will definitely see the write performed by client A, will definitely not, or cannot depend on seeing the write.
  • 4. Conflicting operations • Read-write conflict: a read operation and a write operation act concurrently • Write-Write conflict: two concurrent write operation
  • 5. Reasons for replication Two primary reasons for replicating data reliability and performance However there is price to be paid when data is replicated The problem is with replication that having multiple copies may lead to consistency model i.e. when copy is modified that copy becomes difference from the rest
  • 6. Reasons for replication Therefore modifications have to be caried out on all copies to ensure consistency. Exactly how and when those modifications need to be carried out determines the price of replication.
  • 7. Consistency Model • Provides formal view of how memory system will appears to programmer • Eliminates the gap between the behavior expected by the programmer and actual behavior supported by the system • It is used for contract between software and memory • It says that if the software agrees to obey certain rule then the memory promise to work properly • Memory consistence model for shared address space specifies that in which memory operations must appear to be performed i.e. visible to processors with respect to one other.
  • 8. Consistency Model Consistency is different from coherence. Coherence deals with maintaining a global order in which writes to a single location or single variable are seen by all processors i.e. how memory accesses are coordinated among CPUs. Consistency deals with the ordering of operations to multiple locations with respect to all processors. i.e. when memory writes shows up at another CPU.
  • 9. Consistency Model Consistency models define rules for the apparent order and visibility of updates. There are two methods to define and a categorize consistency models 1. issue: describes the restrictions that define how a process can issue operations 2. View: defines the order of operations visible to processes.
  • 10. Consistency Model •Consistency Model: •Data Centric Consistency Model •Client Centric Consistency Model
  • 11. Consistency Models 1. Strict Consistency Model 2. Sequential Consistency Model 3. Causal Consistency Model 4. PRAM and Processor 5. Weak Consistency Model 6. Eventual Consistency Model 7. Release Consistency Model
  • 12. Strict Consistency Model 1. It Is most strongest consistency model, i.e. model of rules 2. A write to a variable by any processor needs to be seen instantaneously by all processors. 3. It is defined by following conditions 4. Any read to memory location x returns the value stored by the most recent write operation of x 5. Disadvantage: number of messages increase between processors, as single write operation may need to update on all processors 6. We can’t implement this model in all scenario. 7. It doesn't help in answering the question of conflict resolution in concurrent writes to the same data item, because it assumes concurrent writes to be impossible
  • 13. Sequential Consistency Model 1. It is weaker memory model than strict consistency model. 2. It is the most intuitive (with out conscious) model greatly restrict the use of the many performance, optimization used by the uniprocessor hardware and compiler designers 3. Results of any execution is same as if the operations of all the processors were executed in some sequential order and the operations of each individual process appears in the sequence in order specified by its program
  • 14. Sequential Consistency Model 1. Note that this rule says nothing about what order the events happen in 2. Just that happen in some order 3. All instructions are executed atomically and there are no recording between memory instructions 4. This is simple model however performance can’t be at its best 5. One difficulty to bring all operations execute in sequential order.
  • 15. Sequential vs strict Consistency model
  • 16. Causal consistency model 1. It represents a weaking of sequential consistency 2. It makes a distinguish between events that are potentially causally related to and those are not. 3. Condition: writes that are potentially causally related must be seen by all processing the same order. 4. Operations are said to related to another if one might have bee influenced by other operations 5. Operations that are not causally related are said to be concurrent.
  • 18. Weak consistency model 1. Not necessary to show the change in memory done by every write operations to other processes. E.g. when a process executes in a critical sections. 2. Process to synchronization variables are sequentially consistent 3. No access to a synchronization variable allowed to perform until all previous writes are complete every where. 4. No data access write/read is allowed to be performed until all process synchronize variables has been performed
  • 19. Eventual Consistency Model • Based on client centric Model • Many system: one or few processes perform updates, how frequently these updates be made available to other read-only process. • Examples: NIS (News information service), user information database, only system admin update database, users only read data. • Only naming authority allowed updates (hence no write-write conflicts)
  • 20. 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 value or a more recent value. • Once read, subsequent reads on that data items return same or more recent values. • Example: Each time you connect to a different email server, the server fletches all the updates form the server you previously visited. • Example: automatically reading you personal calendar updates from different servers. Monotonic reads guarantees that the user see all updates, no matter from which server the automatic reading takes place.
  • 21. Monotonic Write A write operation by a process on a data item x is completed before any successive write operation on x by the same process. a write must be propagated to all replicas before a successive write by the same process Example: Updating a program at server S2, And ensuring that all components on which compilation and linking depends are also placed at S2. Example: maintaining versions of replicated files in the correct order everywhere (Propagate the previous version to the server where the newest version is installed)
  • 22. PRAM (Pipelined RAM) consistency model 1. Weaker consistency model so for 2. Only write operations is considers 3. Writes done by a single processor are received by all the other processors in the order in which they were issued 4. Writes generates by different processors are concurrent. 5. Write operations performed by single process are in pipelined 6. Simple and easy to implement 7. Also called as FIFO Consistency Model
  • 23. Released Consistency Model 1. Enhancement of weak consistency model. In which operations are performed in a synchronized way. 2. Use of two synchronization variables a) Acquire(use to tell system is entering) b) Release(use to tell system is just exited)