Cache Coherence in Shared Memory Multiprocessors

Slides:



Advertisements
Similar presentations
Extra Cache Coherence Examples In the following examples there are a couple questions. You can answer these for practice by ing Colin at
Advertisements

Lecture 7. Multiprocessor and Memory Coherence
CS252 Graduate Computer Architecture Lecture 25 Memory Consistency Models and Snoopy Bus Protocols Prof John D. Kubiatowicz
CS 7810 Lecture 19 Coherence Decoupling: Making Use of Incoherence J.Huh, J. Chang, D. Burger, G. Sohi Proceedings of ASPLOS-XI October 2004.
Computer Architecture II 1 Computer architecture II Lecture 8.
CIS629 Coherence 1 Cache Coherence: Snooping Protocol, Directory Protocol Some of these slides courtesty of David Patterson and David Culler.
EECC756 - Shaaban #1 lec # 10 Spring Shared Memory Multiprocessors Symmetric Memory Multiprocessors (SMPs): commonly 2-4 processors/node.
EECC756 - Shaaban #1 lec # 11 Spring Shared Memory Multiprocessors Symmetric Multiprocessors (SMPs): –Symmetric access to all of main memory.
1 Lecture 3: Snooping Protocols Topics: snooping-based cache coherence implementations.
Computer architecture II
Bus-Based Multiprocessor
1 COMP 206: Computer Architecture and Implementation Montek Singh Mon, Nov 14, 2005 Topic: Cache Coherence.
EECC756 - Shaaban #1 lec # 10 Spring Multiprocessors Cache Coherence in Bus-Based Shared Memory Multiprocessors Shared Memory Multiprocessors.
Cache Coherence in Bus-Based Shared Memory Multiprocessors
CS 258 Parallel Computer Architecture Lecture 12 Shared Memory Multiprocessors II March 1, 2002 Prof John D. Kubiatowicz
Snooping Cache and Shared-Memory Multiprocessors
©RG:E0243:L2- Parallel Architecture 1 E0-243: Computer Architecture L2 – Parallel Architecture.
Presented By:- Prerna Puri M.Tech(C.S.E.) Cache Coherence Protocols MSI & MESI.
Spring EE 437 Lillevik 437s06-l21 University of Portland School of Engineering Advanced Computer Architecture Lecture 21 MSP shared cached MSI protocol.
Cache Coherence Protocols 1 Cache Coherence Protocols in Shared Memory Multiprocessors Mehmet Şenvar.
Cache Coherence CSE 661 – Parallel and Vector Architectures
Evaluating the Performance of Four Snooping Cache Coherency Protocols Susan J. Eggers, Randy H. Katz.
Shared Memory Consistency Models. SMP systems support shared memory abstraction: all processors see the whole memory and can perform memory operations.
CS252 Graduate Computer Architecture Lecture 18 April 4 th, 2011 Memory Consistency Models and Snoopy Bus Protocols Prof John D. Kubiatowicz
December 1, 2006©2006 Craig Zilles1 Threads and Cache Coherence in Hardware  Previously, we introduced multi-cores. —Today we’ll look at issues related.
Cache Coherence Protocols A. Jantsch / Z. Lu / I. Sander.
ECE 1747: Parallel Programming Basics of Parallel Architectures: Shared-Memory Machines.
1 Memory and Cache Coherence. 2 Shared Memory Multiprocessors Symmetric Multiprocessors (SMPs) Symmetric access to all of main memory from any processor.
Lecture 9 ECE/CSC Spring E. F. Gehringer, based on slides by Yan Solihin1 Lecture 9 Outline  MESI protocol  Dragon update-based protocol.
1 Lecture 3: Coherence Protocols Topics: consistency models, coherence protocol examples.
Cache Coherence CS433 Spring 2001 Laxmikant Kale.
CS267 Lecture 61 Shared Memory Hardware and Memory Consistency Modified from J. Demmel and K. Yelick
CSC/ECE 506: Architecture of Parallel Computers Bus-Based Coherent Multiprocessors 1 Lecture 12 (Chapter 8) Lecture 12 (Chapter 8)
1 Computer Architecture & Assembly Language Spring 2001 Dr. Richard Spillman Lecture 26 – Alternative Architectures.
Outline Introduction (Sec. 5.1)
COSC6385 Advanced Computer Architecture
The University of Adelaide, School of Computer Science
Shared Memory Multiprocessors
Lecture 18: Coherence and Synchronization
Cache Coherence for Shared Memory Multiprocessors
Lecture 9 Outline MESI protocol Dragon update-based protocol
The University of Adelaide, School of Computer Science
Prof. Gennady Pekhimenko University of Toronto Fall 2017
Example Cache Coherence Problem
Flynn’s Taxonomy Flynn classified by data and control streams in 1966
Prof John D. Kubiatowicz
The University of Adelaide, School of Computer Science
Protocol Design Space of Snooping Cache Coherent Multiprocessors
Lecture 2: Snooping-Based Coherence
Chip-Multiprocessor.
Cache Coherence in Bus-Based Shared Memory Multiprocessors
Symmetric Multiprocessors
Lecture 4: Update Protocol
An Extensible Simulator for Bus- and Directory-Based Coherence
Bus-Based Coherent Multiprocessors
Shared Memory Multiprocessors
Lecture 25: Multiprocessors
High Performance Computing
Lecture 25: Multiprocessors
The University of Adelaide, School of Computer Science
Lecture 24: Virtual Memory, Multiprocessors
Lecture 24: Multiprocessors
Lecture 3: Coherence Protocols
Lecture 8 Outline Memory consistency
Prof. Onur Mutlu ETH Zürich Fall November 2017
CS 258 Parallel Computer Architecture Lecture 16 Snoopy Protocols I
Prof John D. Kubiatowicz
Prof John D. Kubiatowicz
Lecture 19: Coherence and Synchronization
The University of Adelaide, School of Computer Science
Presentation transcript:

Cache Coherence in Shared Memory Multiprocessors Chinmay Ashok

An Introduction to The Problem Caches allow greater performance by storing frequently used data in faster memory (closer to the processor) Since all processors share the same address space, it is possible for more than one processor to cache an item at a time If one processor updates the data item without informing the other processors, inconsistencies may result and cause incorrect executions

The Problem P1 P2 P3 4 U : 5 5 U : 5 3 U : 7 $ $ $ U : 5 U : 5 U : 5 1 I/O devices U : 5 MEMORY

The Requirement To ensure that whenever a processor reads a memory location, it receives the correct value Correctness implies that each read from a location should return the last value written to that location The last value is produced by the latest write in program order

Factors to Consider for Solutions For correct execution, coherence must be enforced between the caches Two major factors are: performance implementation cost Four primary design issues are: coherence detection strategy – incoherent memory accesses coherence enforcement strategy – invalidate or update precision of block-sharing information – storage of sharing information cache block size – granularity

Types of Coherence Mechanisms Snoopy coherence mechanisms for bus-based multiprocessors (speed of the communication medium) Directory based coherence mechanisms use a central directory to implement coherence Compiler directed coherence mechanisms (static) let the compiler detect coherence issues and use special instructions to enforce coherence.

Snoopy Protocols Specified by Examples Set of states associated with memory blocks in the local caches State transition diagram Actions associates with each state transition Examples Valid-Invalid MSI MESI MOESI Dragon (Update based)

Valid – Invalid Protocol BusRd/- Assumption – Bus transactions are atomic PrRd/- PrWr/BusWr V BusWr/- PrWr/BusWr (Write Allocate) PrRd/BusRd I PrWr/BusWr (Write No-Allocate) BusRd/- BusWr/-

Memory Consistency For a shared address space this constrains the order in which memory operations must appear to be performed (visibility) This includes operations to the same locations or to different locations, by the same process or by different processes. Memory consistency subsumes coherence

Three State MSI Write-Back Invalidation Protocol Assumption – Bus transactions are atomic PrRd/- PrWr/- M PrWr/BusRdX PrWr/BusRdX BusRd/Flush BusRdX/Flush PrRd/BusRd S I BusRd/- BusRdX/- PrRd/- BusRd/- BusRdX/-

Other Snoopy Protocols MESI – Exclusive State MOESI – Owned State Dragon (Update Based) – M, E, Sm, Sc

Conclusion Cache coherence is necessary Performance and implementation costs are critical factors while choosing a solution Types – Snoopy, directory based and compiler directed Memory consistency models Standard snoopy protocols – Valid/Invalid, MSI, MESI, MOESI and Dragon