Memory Consistency Models 1. Uniform Consistency Models Only have read and write operations Sequential Consistency Pipelined-RAM Causal Consistency Coherence.

Slides:



Advertisements
Similar presentations
1 Episode III in our multiprocessing miniseries. Relaxed memory models. What I really wanted here was an elephant with sunglasses relaxing On a beach,
Advertisements

Implementing Sequentially Consistent Programs on Processor Consistent Platforms Lisa Higham and Jalal Kawash University of Calgary, Canada American University.
Synchronization. How to synchronize processes? – Need to protect access to shared data to avoid problems like race conditions – Typical example: Updating.
1 Written By: Adi Omari (Revised and corrected in 2012 by others) Memory models CDP Tutorial 7.
Memory Consistency Models Kevin Boos. Two Papers Shared Memory Consistency Models: A Tutorial – Sarita V. Adve & Kourosh Gharachorloo – September 1995.
D u k e S y s t e m s Time, clocks, and consistency and the JMM Jeff Chase Duke University.
1 Parallel Parentheses Matching Plus Some Applications.
Consistency and Replication Chapter Topics Reasons for Replication Models of Consistency –Data-centric consistency models: strict, linearizable,
Presented by Evan Yang. Overview of Munin  Distributed shared memory (DSM) system  Unique features Multiple consistency protocols Release consistency.
Shared Memory – Consistency of Shared Variables The ideal picture of shared memory: CPU0CPU1CPU2CPU3 Shared Memory Read/ Write The actual architecture.
Consistency Models Based on Tanenbaum/van Steen’s “Distributed Systems”, Ch. 6, section 6.2.
Consistency and Replication. Replication of data Why? To enhance reliability To improve performance in a large scale system Replicas must be consistent.
1 Lecture 12: Hardware/Software Trade-Offs Topics: COMA, Software Virtual Memory.
Slides for Parallel Programming Techniques & Applications Using Networked Workstations & Parallel Computers 2nd ed., by B. Wilkinson & M
Memory consistency models Presented by: Gabriel Tanase.
Computer Architecture 2011 – coherency & consistency (lec 7) 1 Computer Architecture Memory Coherency & Consistency By Dan Tsafrir, 11/4/2011 Presentation.
Computer Architecture II 1 Computer architecture II Lecture 9.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Consistency.
Memory Consistency Models
Shared Memory – Consistency of Shared Variables The ideal picture of shared memory: CPU0CPU1CPU2CPU3 Shared Memory Read/ Write The actual architecture.
CSS434 DSM1 CSS434 Distributed Shared Memory Textbook Ch18 Professor: Munehiro Fukuda.
Shared Memory Consistency Models: A Tutorial By Sarita V Adve and Kourosh Gharachorloo Presenter: Meenaktchi Venkatachalam.
Memory Consistency Models Some material borrowed from Sarita Adve’s (UIUC) tutorial on memory consistency models.
Shared Memory – Consistency of Shared Variables The ideal picture of shared memory: CPU0CPU1CPU2CPU3 Shared Memory Read/ Write The actual architecture.
Consistency And Replication
©RG:E0243:L2- Parallel Architecture 1 E0-243: Computer Architecture L2 – Parallel Architecture.
Lazy Release Consistency for Software Distributed Shared Memory Pete Keleher Alan L. Cox Willy Z.
Computer Architecture 2015 – Cache Coherency & Consistency 1 Computer Architecture Memory Coherency & Consistency By Yoav Etsion and Dan Tsafrir Presentation.
ECE200 – Computer Organization Chapter 9 – Multiprocessors.
Consistency and Replication. Replication of data Why? To enhance reliability To improve performance in a large scale system Replicas must be consistent.
Memory Consistency Models Alistair Rendell See “Shared Memory Consistency Models: A Tutorial”, S.V. Adve and K. Gharachorloo Chapter 8 pp of Wilkinson.
1 Lecture 12: Hardware/Software Trade-Offs Topics: COMA, Software Virtual Memory.
Ch 10 Shared memory via message passing Problems –Explicit user action needed –Address spaces are distinct –Small Granularity of Transfer Distributed Shared.
Cache Coherence Protocols 1 Cache Coherence Protocols in Shared Memory Multiprocessors Mehmet Şenvar.
Distributed Shared Memory Presentation by Deepthi Reddy.
Shared Memory Consistency Models. SMP systems support shared memory abstraction: all processors see the whole memory and can perform memory operations.
Memory Consistency Models. Outline Review of multi-threaded program execution on uniprocessor Need for memory consistency models Sequential consistency.
Release Consistency Yujia Jin 2/27/02. Motivations Place partial order on memory accesses for correct parallel program behavior Relax partial order for.
DISTRIBUTED COMPUTING
Page 1 Distributed Shared Memory Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
Memory Consistency Zhonghai Lu Outline Introduction What is a memory consistency model? Who should care? Memory consistency models Strict.
CIS 720 Distributed Shared Memory. Shared Memory Shared memory programs are easier to write Multiprocessor systems Message passing systems: - no physically.
Lazy Release Consistency for Software Distributed Shared Memory Pete Keleher Alan L. Cox Willy Z. By Nooruddin Shaik.
Replication Improves reliability Improves availability ( What good is a reliable system if it is not available?) Replication must be transparent and create.
Distributed shared memory u motivation and the main idea u consistency models F strict and sequential F causal F PRAM and processor F weak and release.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Set 16: Distributed Shared Memory 1.
August 13, 2001Systems Architecture II1 Systems Architecture II (CS ) Lecture 11: Multiprocessors: Uniform Memory Access * Jeremy R. Johnson Monday,
1 Lecture 20: Speculation Papers: Is SC+ILP=RC?, Purdue, ISCA’99 Coherence Decoupling: Making Use of Incoherence, Wisconsin, ASPLOS’04.
CS267 Lecture 61 Shared Memory Hardware and Memory Consistency Modified from J. Demmel and K. Yelick
Consistency and Replication CSCI 6900/4900. FIFO Consistency Relaxes the constraints of the causal consistency “Writes done by a single process are seen.
Lecture 28-1 Computer Science 425 Distributed Systems CS 425 / CSE 424 / ECE 428 Fall 2010 Indranil Gupta (Indy) December 2, 2010 Lecture 28 Distributed.
Clock Snooping and its Application in On-the-fly Data Race Detection Koen De Bosschere and Michiel Ronsse University of Ghent, Belgium Taipei, TaiwanDec.
1 Written By: Adi Omari (Revised and corrected in 2012 by others) Memory Models CDP
EE 382 Processor DesignWinter 98/99Michael Flynn 1 EE382 Processor Design Winter 1998 Chapter 8 Lectures Multiprocessors, Part I.
Distributed Shared Memory
Operating Systems Engineering Scalable Locks
Memory Consistency Models
Lecture 19: Coherence and Synchronization
Memory Consistency Models
Consistency Models.
Distributed Shared Memory
Replication Improves reliability Improves availability
Threads and Memory Models Hal Perkins Autumn 2009
Multiprocessor Highlights
Distributed Shared Memory
Exercises for Chapter 16: Distributed Shared Memory
EE 4xx: Computer Architecture and Performance Programming
Design Alternatives for SAS: The Beauty of Mobile Homes
Memory Consistency Models
Lecture 18: Coherence and Synchronization
Presentation transcript:

Memory Consistency Models 1

Uniform Consistency Models Only have read and write operations Sequential Consistency Pipelined-RAM Causal Consistency Coherence Processor Consistency 2

Sequential Consistency All processes order all writes in the same order Operations in the system can be ordered such that it appears they were executed by a single process. Formal definition: An execution E with operations O is Sequentially Consistent if there exists a total order (O, >) such that 1. and 2. (O,>) is valid 3

Pipelined Ram All processes order all writes in program order Formal Definition: An execution E with operations O is Pipelined RAM if for all processes p there exists a total order (O p ⋃ O w, > p ) such that 1. and 2. (O p ⋃ O w, > p ) is valid 4

Coherence All processes view all writes to the same location in the same order. Formal Definition: An execution E with operations O is Coherent if for all locations x there exists a total order (O x, > x ) such that 1. and 2. (O x, > x ) is valid 5

Causal Consistency All processes order writes such that it satisfies Lamport’s happens-before relation Formal Definition: An execution E with operations O is Causally Consistent if for all processes p there exists a total order (O p ⋃ O w, > p ) such that 1. and 2. (O p ⋃ O w, > p ) is valid 6

Hybrid Models Distinguish between different types of memory accesses Release Consistency – Provides acquire and release operations Entry Consistency – Each shared variable has a lock Scope Consistency – Variables are associated with locks automatically Weak Consistency – Orders synchronization operations 7

Release Consistency Hybrid Model Operations available: – Read – read local copy – Write – write to local copy – Acquire – update local copy – Release – send updates of local copy Acquire and Release ops are sequentially consistent 8

Acquire-release Order (O, ) – acquire-release order O 1 o 2 if o 1 o 2 and – o 1 and o 2 are on the same data item, or – o 1 is an acquire, or – o 2 is a release, or – There exists o st o 1 o and o o 2 9

Definition of RC A computation is Release Consistent if Each process orders its own ops, all writes, release and acquire operations Such that the order satisfies the acquire-release order The acquire and release ops are ordered such that – All processes agree on the ordering (SC) – Each acquire is immediately followed by its matching release. 10