Lecture 7: PCM, Cache coherence

Slides:



Advertisements
Similar presentations
1 Lecture 6: Directory Protocols Topics: directory-based cache coherence implementations (wrap-up of SGI Origin and Sequent NUMA case study)
Advertisements

1 Lecture 4: Directory Protocols Topics: directory-based cache coherence implementations.
1 Lecture 6: Chipkill, PCM Topics: error correction, PCM basics, PCM writes and errors.
SAFER: Stuck-At-Fault Error Recovery for Memories Nak Hee Seong † Dong Hyuk Woo † Vijayalakshmi Srinivasan ‡ Jude A. Rivers ‡ Hsien-Hsin S. Lee † ‡†
1 Lecture 12: Hardware/Software Trade-Offs Topics: COMA, Software Virtual Memory.
The University of Adelaide, School of Computer Science
CS 7810 Lecture 19 Coherence Decoupling: Making Use of Incoherence J.Huh, J. Chang, D. Burger, G. Sohi Proceedings of ASPLOS-XI October 2004.
Lecture 18: Multiprocessors
1 Lecture 15: PCM, Networks Today: PCM wrap-up, projects discussion, on-chip networks background.
1 Lecture 12: Large Cache Design Papers (papers from last class and…): Co-Operative Caching for Chip Multiprocessors, Chang and Sohi, ISCA’06 Victim Replication,
CIS629 Coherence 1 Cache Coherence: Snooping Protocol, Directory Protocol Some of these slides courtesty of David Patterson and David Culler.
1 Lecture 15: DRAM Design Today: DRAM basics, DRAM innovations (Section 5.3)
1 Lecture 16: Virtual Memory Today: DRAM innovations, virtual memory (Sections )
CS252/Patterson Lec /23/01 CS213 Parallel Processing Architecture Lecture 7: Multiprocessor Cache Coherency Problem.
1 Lecture 2: Snooping and Directory Protocols Topics: Snooping wrap-up and directory implementations.
1 Lecture 1: Parallel Architecture Intro Course organization:  ~5 lectures based on Culler-Singh textbook  ~5 lectures based on Larus-Rajwar textbook.
1 Lecture 20: Coherence protocols Topics: snooping and directory-based coherence protocols (Sections )
1 Lecture 1: Introduction Course organization:  4 lectures on cache coherence and consistency  2 lectures on transactional memory  2 lectures on interconnection.
1 Lecture 3: Snooping Protocols Topics: snooping-based cache coherence implementations.
1 Lecture 24: Multiprocessors Today’s topics:  Directory-based cache coherence protocol  Synchronization  Consistency  Writing parallel programs Reminder:
1 Lecture 18: Coherence Protocols Topics: coherence protocols for symmetric and distributed shared-memory multiprocessors (Sections )
1 Lecture 8: Large Cache Design I Topics: Shared vs. private, centralized vs. decentralized, UCA vs. NUCA, recent papers.
1 Lecture 5: Directory Protocols Topics: directory-based cache coherence implementations.
1 Lecture 23: Multiprocessors Today’s topics:  RAID  Multiprocessor taxonomy  Snooping-based cache coherence protocol.
1 Lecture 2: Intro and Snooping Protocols Topics: multi-core cache organizations, programming models, cache coherence (snooping-based)
1 Lecture 18: Shared-Memory Multiprocessors Topics: coherence protocols for symmetric shared-memory multiprocessors (Sections )
1 Lecture 3: Directory-Based Coherence Basic operations, memory-based and cache-based directories.
1 Lecture 14: DRAM, PCM Today: DRAM scheduling, reliability, PCM Class projects.
CS252/Patterson Lec /28/01 CS 213 Lecture 10: Multiprocessor 3: Directory Organization.
1 Lecture 20: Protocols and Synchronization Topics: distributed shared-memory multiprocessors, synchronization (Sections )
Lecture 37: Chapter 7: Multiprocessors Today’s topic –Introduction to multiprocessors –Parallelism in software –Memory organization –Cache coherence 1.
1 Shared-memory Architectures Adapted from a lecture by Ian Watson, University of Machester.
Multiprocessor Cache Coherency
Spring 2003CSE P5481 Cache Coherency Cache coherent processors reading processor must get the most current value most current value is the last write Cache.
1 Cache coherence CEG 4131 Computer Architecture III Slides developed by Dr. Hesham El-Rewini Copyright Hesham El-Rewini.
Effects of wrong path mem. ref. in CC MP Systems Gökay Burak AKKUŞ Cmpe 511 – Computer Architecture.
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.
1 Lecture 19: Scalable Protocols & Synch Topics: coherence protocols for distributed shared-memory multiprocessors and synchronization (Sections )
1 Lecture 3: Coherence Protocols Topics: consistency models, coherence protocol examples.
1 Lecture: Coherence Protocols Topics: snooping-based protocols.
1 Lecture 7: PCM Wrap-Up, Cache coherence Topics: handling PCM errors and writes, cache coherence intro.
1 Lecture: Coherence Topics: snooping-based coherence, directory-based coherence protocols (Sections )
1 Lecture 7: Implementing Cache Coherence Topics: implementation details.
CMSC 611: Advanced Computer Architecture Shared Memory Most slides adapted from David Patterson. Some from Mohomed Younis.
The University of Adelaide, School of Computer Science
1 Lecture 8: Snooping and Directory Protocols Topics: 4/5-state snooping protocols, split-transaction implementation details, directory implementations.
Lecture 8: Snooping and Directory Protocols
תרגול מס' 5: MESI Protocol
Lecture 18: Coherence and Synchronization
Lecture 13: Large Cache Design I
Lecture 9: Directory-Based Examples II
Lecture 2: Snooping-Based Coherence
Lecture 5: Snooping Protocol Design Issues
Lecture 6: Reliability, PCM
Lecture 8: Directory-Based Cache Coherence
Lecture 7: Directory-Based Cache Coherence
Lecture 25: Multiprocessors
Lecture 9: Directory-Based Examples
Lecture 8: Directory-Based Examples
Lecture 25: Multiprocessors
Lecture 24: Virtual Memory, Multiprocessors
Lecture 23: Virtual Memory, Multiprocessors
Lecture 24: Multiprocessors
Lecture: Coherence Topics: wrap-up of snooping-based coherence,
Lecture 3: Coherence Protocols
Lecture 17 Multiprocessors and Thread-Level Parallelism
Lecture 19: Coherence and Synchronization
Lecture 18: Coherence and Synchronization
Lecture 10: Directory-Based Examples II
Presentation transcript:

Lecture 7: PCM, Cache coherence Topics: handling PCM errors and writes, cache coherence intro

Phase Change Memory Emerging NVM technology that can replace Flash and DRAM Much higher density; much better scalability; can do multi-level cells When materials (GST) are heated (with electrical pulses) and then cooled, they form either crystalline or amorphous materials depending on the intensity and duration of the pulses; crystalline materials have low resistance (1 state) and amorphous materials have high resistance (0 state) Non-volatile, fast reads (~50ns), slow and energy-hungry writes; limited lifetime (~10 writes per cell), no leakage 8

PCM as a Main Memory Lee et al., ISCA 2009

PCM as a Main Memory Lee et al., ISCA 2009 Two main innovations to overcome these drawbacks: decoupled row buffers and non-destructive PCM reads multiple narrow row buffers (row buffer cache)

Optimizations for Writes (Energy, Lifetime) Read a line before writing and only write the modified bits Zhou et al., ISCA’09 Write either the line or its inverted version, whichever causes fewer bit-flips Cho and Lee, MICRO’09 Only write dirty lines in a PCM page (when a page is evicted from a DRAM cache) Lee et al., Qureshi et al., ISCA’09 When a page is brought from disk, place it only in DRAM cache and place in PCM upon eviction Qureshi et al., ISCA’09 Wear-leveling: rotate every new page, shift a row periodically, swap segments Zhou et al., Qureshi et al., ISCA’09

Hard Error Tolerance in PCM PCM cells will eventually fail; important to cause gradual capacity degradation when this happens Pairing: among the pool of faulty pages, pair two pages that have faults in different locations; replicate data across the two pages Ipek et al., ASPLOS’10 Errors are detected with parity bits; replica reads are issued if the initial read is faulty

ECP Schechter et al., ISCA’10 Instead of using ECC to handle a few transient faults in DRAM, use error-correcting pointers to handle hard errors in specific locations For a 512-bit line with 1 failed bit, maintain a 9-bit field to track the failed location and another bit to store the value in that location Can store multiple such pointers and can recover from faults in the pointers too ECC has similar storage overhead and can handle soft errors; but ECC has high entropy and can hasten wearout

SAFER Seong et al., MICRO 2010 Most PCM hard errors are stuck-at faults (stuck at 0 or stuck at 1) Either write the word or its flipped version so that the failed bit is made to store the stuck-at value For multi-bit errors, the line can be partitioned such that each partition has a single error Errors are detected by verifying a write; recently failed bit locations are cached so multiple writes can be avoided

FREE-p Yoon et al., HPCA 2011 When a PCM block is unusable because the number of hard errors has exceeded the ECC capability, it is remapped to another address; the pointer to this address is stored in the failed block The pointer can be replicated many times in the failed block to tolerate the multiple errors in the failed block Requires two accesses when handling failed blocks; this overhead can be reduced by caching the pointer at the memory controller

Multi-Core Cache Organizations P P P P P P P P C C C C C C C C C C C C C C C C C C C C Private L1 caches Shared L2 cache Bus between L1s and single L2 cache controller Snooping-based coherence between L1s

Multi-Core Cache Organizations P P P P C C C C Private L1 caches Shared L2 cache, but physically distributed Bus connecting the four L1s and four L2 banks Snooping-based coherence between L1s

Multi-Core Cache Organizations P P P P C C C C P P P P C C C C Private L1 caches Shared L2 cache, but physically distributed Scalable network Directory-based coherence between L1s

Multi-Core Cache Organizations P P P P C C C C D P P P P C C C C Private L1 caches Private L2 caches Scalable network Directory-based coherence between L2s (through a separate directory)

Shared-Memory Vs. Message Passing single copy of (shared) data in memory threads communicate by reading/writing to a shared location Message-passing each thread has a copy of data in its own private memory that other threads cannot access threads communicate by passing values with SEND/ RECEIVE message pairs

Cache Coherence A multiprocessor system is cache coherent if a value written by a processor is eventually visible to reads by other processors – write propagation two writes to the same location by two processors are seen in the same order by all processors – write serialization

Cache Coherence Protocols Directory-based: A single location (directory) keeps track of the sharing status of a block of memory Snooping: Every cache block is accompanied by the sharing status of that block – all cache controllers monitor the shared bus so they can update the sharing status of the block, if necessary Write-invalidate: a processor gains exclusive access of a block before writing by invalidating all other copies Write-update: when a processor writes, it updates other shared copies of that block

Protocol-I MSI 3-state write-back invalidation bus-based snooping protocol Each block can be in one of three states – invalid, shared, modified (exclusive) A processor must acquire the block in exclusive state in order to write to it – this is done by placing an exclusive read request on the bus – every other cached copy is invalidated When some other processor tries to read an exclusive block, the block is demoted to shared

Design Issues, Optimizations When does memory get updated? demotion from modified to shared? move from modified in one cache to modified in another? Who responds with data? – memory or a cache that has the block in exclusive state – does it help if sharers respond? We can assume that bus, memory, and cache state transactions are atomic – if not, we will need more states A transition from shared to modified only requires an upgrade request and no transfer of data

Reporting Snoop Results In a multiprocessor, memory has to wait for the snoop result before it chooses to respond – need 3 wired-OR signals: (i) indicates that a cache has a copy, (ii) indicates that a cache has a modified copy, (iii) indicates that the snoop has not completed Ensuring timely snoops: the time to respond could be fixed or variable (with the third wired-OR signal) Tags are usually duplicated if they are frequently accessed by the processor (regular ld/sts) and the bus (snoops)

4 and 5 State Protocols Multiprocessors execute many single-threaded programs A read followed by a write will generate bus transactions to acquire the block in exclusive state even though there are no sharers (leads to MESI protocol) Also, to promote cache-to-cache sharing, a cache must be designated as the responder (leads to MOESI protocol) Note that we can optimize protocols by adding more states – increases design/verification complexity

MESI Protocol The new state is exclusive-clean – the cache can service read requests and no other cache has the same block When the processor attempts a write, the block is upgraded to exclusive-modified without generating a bus transaction When a processor makes a read request, it must detect if it has the only cached copy – the interconnect must include an additional signal that is asserted by each cache if it has a valid copy of the block When a block is evicted, a block may be exclusive-clean, but will not realize it

MOESI Protocol The first reader or the last writer are usually designated as the owner of a block The owner is responsible for responding to requests from other caches There is no need to update memory when a block transitions from M  S state The block in O state is responsible for writing back a dirty block when it is evicted

Title Bullet