CSC 631: High-Performance Computer Architecture

Similar documents
CS 152 Computer Architecture and Engineering. Lecture 19: Directory-Based Cache Protocols

CS 152 Computer Architecture and Engineering

CS 152 Computer Architecture and Engineering. Lecture 19: Directory-Based Cache Protocols

CS 152 Computer Architecture and Engineering CS252 Graduate Computer Architecture. Lecture 18 Cache Coherence

CS 152 Computer Architecture and Engineering. Lecture 19: Directory- Based Cache Protocols. Recap: Snoopy Cache Protocols

CS 152 Computer Architecture and Engineering. Lecture 19: Directory-Based Cache Protocols

CS 152 Computer Architecture and Engineering. Lecture 8 - Memory Hierarchy-III

Lecture 7 - Memory Hierarchy-II

CS252 Spring 2017 Graduate Computer Architecture. Lecture 12: Cache Coherence

CS 152 Computer Architecture and Engineering. Lecture 7 - Memory Hierarchy-II

CS 152 Computer Architecture and Engineering. Lecture 8 - Memory Hierarchy-III

EE 660: Computer Architecture Advanced Caches

CS 152 Computer Architecture and Engineering. Lecture 7 - Memory Hierarchy-II

CS 152 Computer Architecture and Engineering. Lecture 8 - Memory Hierarchy-III

Chapter 6. Parallel Processors from Client to Cloud Part 2 COMPUTER ORGANIZATION AND DESIGN. Homogeneous & Heterogeneous Multicore Architectures

ECE 552 / CPS 550 Advanced Computer Architecture I. Lecture 13 Memory Part 2

ECE 252 / CPS 220 Advanced Computer Architecture I. Lecture 13 Memory Part 2

CS252 Spring 2017 Graduate Computer Architecture. Lecture 11: Memory

Page 1. Multilevel Memories (Improving performance using a little cash )

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Parallel Processors from Client to Cloud Part 2

EC 513 Computer Architecture

CS 152 Computer Architecture and Engineering CS252 Graduate Computer Architecture. Lecture 7 Memory III

Page 1. Cache Coherence

EC 513 Computer Architecture

10/16/2017. Miss Rate: ABC. Classifying Misses: 3C Model (Hill) Reducing Conflict Misses: Victim Buffer. Overlapping Misses: Lockup Free Cache

CS 152 Computer Architecture and Engineering. Lecture 7 - Memory Hierarchy-II

Introduction to Multiprocessors (Part II) Cristina Silvano Politecnico di Milano

Caches Part 1. Instructor: Sören Schwertfeger. School of Information Science and Technology SIST

EE 4683/5683: COMPUTER ARCHITECTURE

Memory Hierarchy. 2/18/2016 CS 152 Sec6on 5 Colin Schmidt

The Memory Hierarchy. Cache, Main Memory, and Virtual Memory (Part 2)

Chapter 5 (Part II) Large and Fast: Exploiting Memory Hierarchy. Baback Izadi Division of Engineering Programs

Chapter 2: Memory Hierarchy Design Part 2

Chapter 2: Memory Hierarchy Design Part 2

Agenda. EE 260: Introduction to Digital Design Memory. Naive Register File. Agenda. Memory Arrays: SRAM. Memory Arrays: Register File

Memory Hierarchy. Slides contents from:

Why memory hierarchy? Memory hierarchy. Memory hierarchy goals. CS2410: Computer Architecture. L1 cache design. Sangyeun Cho

Lecture notes for CS Chapter 2, part 1 10/23/18

CS3350B Computer Architecture

Cache Coherence. CMU : Parallel Computer Architecture and Programming (Spring 2012)

CMSC 411 Computer Systems Architecture Lecture 21 Multiprocessors 3

CS 61C: Great Ideas in Computer Architecture (Machine Structures) Caches Part 1

Cache Coherence Protocols: Implementation Issues on SMP s. Cache Coherence Issue in I/O

12 Cache-Organization 1

Parallel Computer Architecture Spring Shared Memory Multiprocessors Memory Coherence

Lecture-14 (Memory Hierarchy) CS422-Spring

CS 152, Spring 2011 Section 12

Advanced Computer Architecture

Lecture: Cache Hierarchies. Topics: cache innovations (Sections B.1-B.3, 2.1)

Multiprocessors & Thread Level Parallelism

Cache Coherence Protocols for Sequential Consistency

Computer Architecture Computer Science & Engineering. Chapter 5. Memory Hierachy BK TP.HCM

LECTURE 4: LARGE AND FAST: EXPLOITING MEMORY HIERARCHY

Shared Memory Multiprocessors. Symmetric Shared Memory Architecture (SMP) Cache Coherence. Cache Coherence Mechanism. Interconnection Network

Announcements. ECE4750/CS4420 Computer Architecture L6: Advanced Memory Hierarchy. Edward Suh Computer Systems Laboratory

COEN-4730 Computer Architecture Lecture 08 Thread Level Parallelism and Coherence

Advanced Caching Techniques (2) Department of Electrical Engineering Stanford University

Memory Hierarchy. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

Lecture 11 Cache. Peng Liu.

Chapter 5. Large and Fast: Exploiting Memory Hierarchy

CS252 Graduate Computer Architecture Spring 2014 Lecture 10: Memory

Memory Hierarchy. Slides contents from:

Page 1. Memory Hierarchies (Part 2)

Multilevel Memories. Joel Emer Computer Science and Artificial Intelligence Laboratory Massachusetts Institute of Technology

Cache Performance and Memory Management: From Absolute Addresses to Demand Paging. Cache Performance

TDT Coarse-Grained Multithreading. Review on ILP. Multi-threaded execution. Contents. Fine-Grained Multithreading

Multiprocessor Cache Coherence. Chapter 5. Memory System is Coherent If... From ILP to TLP. Enforcing Cache Coherence. Multiprocessor Types

MULTIPROCESSORS AND THREAD-LEVEL. B649 Parallel Architectures and Programming

Cache Memory COE 403. Computer Architecture Prof. Muhamed Mudawar. Computer Engineering Department King Fahd University of Petroleum and Minerals

Computer Architecture Spring 2016

Chapter 5. Multiprocessors and Thread-Level Parallelism

MULTIPROCESSORS AND THREAD-LEVEL PARALLELISM. B649 Parallel Architectures and Programming

Cache Coherence in Bus-Based Shared Memory Multiprocessors

Computer Architecture. A Quantitative Approach, Fifth Edition. Chapter 5. Multiprocessors and Thread-Level Parallelism

CHAPTER 4 MEMORY HIERARCHIES TYPICAL MEMORY HIERARCHY TYPICAL MEMORY HIERARCHY: THE PYRAMID CACHE PERFORMANCE MEMORY HIERARCHIES CACHE DESIGN

Course Administration

Lecture 18: Coherence Protocols. Topics: coherence protocols for symmetric and distributed shared-memory multiprocessors (Sections

CSF Improving Cache Performance. [Adapted from Computer Organization and Design, Patterson & Hennessy, 2005]

ECE 485/585 Microprocessor System Design

Lecture 10: Cache Coherence: Part I. Parallel Computer Architecture and Programming CMU , Spring 2013

Lecture 13: Cache Hierarchies. Today: cache access basics and innovations (Sections )

CSE 431 Computer Architecture Fall Chapter 5A: Exploiting the Memory Hierarchy, Part 1

CS 252 Graduate Computer Architecture. Lecture 11: Multiprocessors-II

Chapter 5. Multiprocessors and Thread-Level Parallelism

CSF Cache Introduction. [Adapted from Computer Organization and Design, Patterson & Hennessy, 2005]

EC 513 Computer Architecture

EITF20: Computer Architecture Part4.1.1: Cache - 2

Computer Organization and Structure. Bing-Yu Chen National Taiwan University

Suggested Readings! What makes a memory system coherent?! Lecture 27" Cache Coherency! ! Readings! ! Program order!! Sequential writes!! Causality!

Topics to be covered. EEC 581 Computer Architecture. Virtual Memory. Memory Hierarchy Design (II)

COSC 6385 Computer Architecture. - Memory Hierarchies (II)

Lecture 10: Cache Coherence: Part I. Parallel Computer Architecture and Programming CMU /15-618, Spring 2015

Lecture 14: Cache Innovations and DRAM. Today: cache access basics and innovations, DRAM (Sections )

Chapter 5. Large and Fast: Exploiting Memory Hierarchy

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. 5 th. Edition. Chapter 5. Large and Fast: Exploiting Memory Hierarchy

L2 cache provides additional on-chip caching space. L2 cache captures misses from L1 cache. Summary

CS161 Design and Architecture of Computer Systems. Cache $$$$$

EEC 170 Computer Architecture Fall Cache Introduction Review. Review: The Memory Hierarchy. The Memory Hierarchy: Why Does it Work?

Donn Morrison Department of Computer Science. TDT4255 Memory hierarchies

EITF20: Computer Architecture Part4.1.1: Cache - 2

Transcription:

CSC 631: High-Performance Computer Architecture Spring 2017 Lecture 10: Memory Part II CSC 631: High-Performance Computer Architecture 1 Two predictable properties of memory references: Temporal Locality: If a location is referenced it is likely to be referenced again in the near future. Spatial Locality: If a location is referenced it is likely that locations near it will be referenced in the near future. CSC 631: High-Performance Computer Architecture 2

Memory Reference Patterns Memory Address (one dot per access) Spatial Locality Temporal Locality Donald J. Hatfield, Jeanette Gerald: Program Restructuring for Virtual Memory. IBM Systems Journal Time 10(3): 168-192 (1971) CSC 631: High-Performance Computer Architecture 3 Memory Hierarchy Small, fast memory near processor to buffer accesses to big, slow memory Make combination look like a big, fast memory Keep recently accessed data in small fast memory closer to processor to exploit temporal locality replacement policy favors recently accessed data Fetch words around requested word to exploit spatial locality Use multiword cache lines, and prefetching CSC 631: High-Performance Computer Architecture 4 4

Management of Memory Hierarchy Small/fast storage, e.g., registers Address usually specified in instruction Generally implemented directly as a register file but hardware might do things behind software s back, e.g., stack management, register renaming Larger/slower storage, e.g., main memory Address usually computed from values in register Generally implemented as a hardware-managed cache hierarchy (hardware decides what is kept in fast memory) but software may provide hints, e.g., don t cache or prefetch CSC 631: High-Performance Computer Architecture 5 5 Important Parameters (Review) Capacity (in bytes) Associativity (from direct-mapped to fully associative) Line size (bytes sharing a tag) Write-back versus write-through Write-allocate versus write no-allocate Replacement policy (least recently used, random) CSC 631: High-Performance Computer Architecture 6 6

Improving Performance Average memory access time (AMAT) = Hit time + Miss rate x Miss penalty To improve performance: reduce the hit time reduce the miss rate reduce the miss penalty What is best cache design for 5-stage pipeline? Biggest cache that doesn t increase hit time past 1 cycle (approx 8-32KB in modern technology) [ design issues more complex with deeper pipelines and/or out-oforder superscalar processors] CSC 631: High-Performance Computer Architecture 7 7 Causes of Misses: The 3 C s Compulsory: first reference to a line (a.k.a. cold start misses) misses that would occur even with infinite cache Capacity: cache is too small to hold all data needed by the program misses that would occur even under perfect replacement policy Conflict: misses that occur because of collisions due to line-placement strategy misses that would not occur with ideal full associativity CSC 631: High-Performance Computer Architecture 8 8

Effect of Parameters on Performance Larger cache size + reduces capacity and conflict misses - hit time will increase Higher associativity + reduces conflict misses - may increase hit time Larger line size + reduces compulsory misses - increases conflict misses and miss penalty CSC 631: High-Performance Computer Architecture 9 9 Multilevel s Problem: A memory cannot be large and fast Solution: Increasing sizes of cache at each level L1$ L2$ DRAM Local miss rate = misses in cache / accesses to cache Global miss rate = misses in cache / memory accesses Misses per instruction = misses in cache / number of instructions CSC 631: High-Performance Computer Architecture 10 10

Presence of L2 influences L1 design Use smaller L1 if there is also L2 Trade increased L1 miss rate for reduced L1 hit time Backup L2 reduces L1 miss penalty Reduces average access energy Use simpler write-through L1 with on-chip L2 Write-back L2 cache absorbs write traffic, doesn t go off-chip At most one L1 miss request per L1 access (no dirty victim write back) simplifies pipeline control Simplifies coherence issues Simplifies error recovery in L1 (can use just parity bits in L1 and reload from L2 when parity error detected on L1 read) CSC 631: High-Performance Computer Architecture 11 11 Inclusion Policy Inclusive multilevel cache: Inner cache can only hold lines also present in outer cache External coherence snoop access need only check outer cache Exclusive multilevel caches: Inner cache may hold lines not in outer cache Swap lines between inner/outer caches on miss Used in AMD Athlon with 64KB primary and 256KB secondary cache Why choose one type or the other? CSC 631: High-Performance Computer Architecture 12 12

Power 7 On-Chip s [IBM 2009] 32KB L1 I$/core 32KB L1 D$/core 3-cycle latency 256KB Unified L2$/core 8-cycle latency 32MB Unified Shared L3$ Embedded DRAM (edram) 25-cycle latency to local slice CSC 631: High-Performance Computer Architecture 13 13 Prefetching Speculate on future instruction and data accesses and fetch them into cache(s) Instruction accesses easier to predict than data accesses Varieties of prefetching Hardware prefetching Software prefetching Mixed schemes What types of misses does prefetching affect? CSC 631: High-Performance Computer Architecture 14 14

Issues in Prefetching Usefulness should produce hits Timeliness not late and not too early and bandwidth pollution RF L1 Instruction L1 Data Unified L2 Prefetched data CSC 631: High-Performance Computer Architecture 15 15 Hardware Instruction Prefetching Instruction prefetch in Alpha AXP 21064 Fetch two lines on a miss; the requested line (i) and the next consecutive line (i+1) Requested line placed in cache, and next line in instruction stream buffer If miss in cache but hit in stream buffer, move stream buffer line into cache and prefetch next line (i+2) RF Req line Stream Buffer L1 Instruction Prefetched instruction line Req line Unified L2 CSC 631: High-Performance Computer Architecture 16 16

Hardware Data Prefetching Prefetch-on-miss: Prefetch b + 1 upon miss on b One-Block Lookahead (OBL) scheme Initiate prefetch for block b + 1 when block b is accessed Why is this different from doubling block size? Can extend to N-block lookahead Strided prefetch If observe sequence of accesses to line b, b+n, b+2n, then prefetch b+3n etc. Example: IBM Power 5 [2003] supports eight independent streams of strided prefetch per processor, prefetching 12 lines ahead of current access CSC 631: High-Performance Computer Architecture 17 17 Software Prefetching for(i=0; i < N; i++) { prefetch( &a[i + 1] ); prefetch( &b[i + 1] ); SUM = SUM + a[i] * b[i]; } CSC 631: High-Performance Computer Architecture 18 18

Software Prefetching Issues Timing is the biggest issue, not predictability If you prefetch very close to when the data is required, you might be too late Prefetch too early, cause pollution Estimate how long it will take for the data to come into L1, so we can set P appropriately Why is this hard to do? for(i=0; i < N; i++) { prefetch( &a[i + P] ); prefetch( &b[i + P] ); SUM = SUM + a[i] * b[i]; } Must consider cost of prefetch instructions CSC 631: High-Performance Computer Architecture 19 19 Compiler Optimizations Restructuring code affects the data access sequence Group data accesses together to improve spatial locality Re-order data accesses to improve temporal locality Prevent data from entering the cache Useful for variables that will only be accessed once before being replaced Needs mechanism for software to tell hardware not to cache data ( no-allocate instruction hints or page table bits) Kill data that will never be used again Streaming data exploits spatial locality but not temporal locality Replace into dead cache locations CSC 631: High-Performance Computer Architecture 20 20

Shared Memory Multiprocessor Memory Bus 1 Snoopy Main Memory (DRAM) 2 Snoopy DMA Disk 3 Snoopy DMA Network Use snoopy mechanism to keep all processors view of memory coherent CSC 631: High-Performance Computer Architecture 21 21 Snoopy, Goodman 1983 Idea: Have cache watch (or snoop upon) other memory transactions, and then do the right thing Snoopy cache tags are dual-ported Used to drive Memory Bus when is Bus Master Proc. A R/W D Tags and State Data (lines) A R/W Snoopy read port attached to Memory Bus CSC 631: High-Performance Computer Architecture 22 22

Snoopy Coherence Protocols Write miss: the address is invalidated in all other caches before the write is performed Read miss: if a dirty copy is found in some cache, a writeback is performed before the memory is read CSC 631: High-Performance Computer Architecture 23 23 State Transition Diagram The MSI protocol Each cache line has state bits state bits Address tag Write miss (P1 gets line from memory) Other processor reads (P 1 writes back) M: Modified S: Shared I: Invalid M P 1 reads or writes Read miss (P1 gets line from memory) Other processor intent to write (P 1 writes back) Read by any processor S Other processor intent to write I state in processor P 1 CSC 631: High-Performance Computer Architecture 24 24

Two Processor Example (Reading and writing the same cache line) P 1 reads P 1 writes P 2 reads P 2 writes P 1 reads P 1 writes P 2 writes P 1 writes P 1 Read miss P 2 reads, P 1 writes back S P 2 intent to write M I P 1 reads or writes Write miss P 2 intent to write P 2 P 1 reads, P 2 writes back M P 2 reads or writes Write miss P 1 intent to write Read miss S P 1 intent to write I CSC 631: High-Performance Computer Architecture 25 25 Observation Other processor reads P 1 writes back M P 1 reads or writes Write miss Read miss Read by any processor S Other processor intent to write If a line is in the M state then no other cache can have a copy of the line! Memory stays coherent, multiple differing copies cannot exist I Other processor intent to write CSC 631: High-Performance Computer Architecture 26 26

MESI: An Enhanced MSI protocol increased performance for private data Each cache line has a tag state bits Address tag Write miss P 1 write or read M Other processor reads P 1 writes back Read miss, shared Read by any processor S P 1 intent to write P 1 write Other processor intent to write M: Modified Exclusive E: Exclusive but unmodified S: Shared I: Invalid Other processor reads Other processor intent to write, P1 writes back E I P 1 read Other processor intent to write state in processor P 1 Read miss, not shared CSC 631: High-Performance Computer Architecture 27 27 Optimized Snoop with Level-2 s L1 $ L1 $ L1 $ L1 $ L2 $ L2 $ L2 $ L2 $ Snooper Snooper Snooper Snooper Processors often have two-level caches small L1, large L2 (usually both on chip now) Inclusion property: entries in L1 must be in L2 invalidation in L2 Þ invalidation in L1 Snooping on L2 does not affect -L1 bandwidth CSC 631: High-Performance Computer Architecture 28 28

Intervention -1-2 A 200 cache-1 -Memory bus A 100 cache-2 memory (stale data) When a read-miss for A occurs in cache-2, a read request for A is placed on the bus -1 needs to supply & change its state to shared The memory may respond to the request also! Does memory know it has stale data? -1 needs to intervene through memory controller to supply correct data to cache-2 CSC 631: High-Performance Computer Architecture 29 29 False Sharing state line addr data0 data1... datan A cache line contains more than one word -coherence is done at the line-level and not word-level Suppose M 1 writes word i and M 2 writes word k and both words have the same line address. What can happen? CSC 631: High-Performance Computer Architecture 30 30

Performance of Symmetric Multiprocessors (SMPs) performance is combination of: Uniprocessor cache miss traffic Traffic caused by communication Results in invalidations and subsequent cache misses Coherence misses Sometimes called a Communication miss 4th C of cache misses along with Compulsory, Capacity, & Conflict. CSC 631: High-Performance Computer Architecture 31 31 Coherency Misses True sharing misses arise from the communication of data through the cache coherence mechanism Invalidates due to 1st write to shared line Reads by another of modified line in different cache Miss would still occur if line size were 1 word False sharing misses when a line is invalidated because some word in the line, other than the one being read, is written into Invalidation does not cause a new value to be communicated, but only causes an extra cache miss Line is shared, but no word in line is actually shared Þ miss would not occur if line size were 1 word CSC 631: High-Performance Computer Architecture 32 32

Example: True v. False Sharing v. Hit? Assume x1 and x2 in same cache line. P1 and P2 both read x1 and x2 before. Time P1 P2 True, False, Hit? Why? 1 Write x1 2 Read x2 3 Write x1 4 Write x2 5 Read x2 True miss; invalidate x1 in P2 False miss; x1 irrelevant to P2 False miss; x1 irrelevant to P2 True miss; x2 not writeable True miss; invalidate x2 in P1 CSC 631: High-Performance Computer Architecture 33 33 MP Performance 4-Processor Commercial Workload: OLTP, Decision Support (Database), Search Engine Uniprocessor cache misses improve with cache size increase (Instruction, Capacity/Confli ct, Compulsory) True sharing and false sharing unchanged going from 1 MB to 8 MB (L3 cache) Memory cycles per instruction 3.25 3 2.75 2.5 2.25 2 1.75 1.5 1.25 1 0.75 0.5 0.25 0 1 MB 2 MB 4 MB 8 MB size Instruction Capacity/Conflict Cold False Sharing True Sharing CSC 631: High-Performance Computer Architecture 34 34

MP Performance 2MB Commercial Workload: OLTP, Decision Support (Database), Search Engine True sharing, false sharing increase going from 1 to 8 s Memory cycles per instruction 3 2.5 2 1.5 1 0.5 Instruction Conflict/Capacity Cold False Sharing True Sharing 0 1 2 4 6 8 Processor count CSC 631: High-Performance Computer Architecture 35 35 Scaling Snoopy/Broadcast Coherence When any processor gets a miss, must probe every other cache Scaling up to more processors limited by: Communication bandwidth over bus Snoop bandwidth into tags Can improve bandwidth by using multiple interleaved buses with interleaved tag banks E.g, two bits of address pick which of four buses and four tag banks to use (e.g., bits 7:6 of address pick bus/tag bank, bits 5:0 pick byte in 64-byte line) Buses don t scale to large number of connections, so can use point-to-point network for larger number of nodes, but then limited by tag bandwidth when broadcasting snoop requests. Insight: Most snoops fail to find a match! CSC 631: High-Performance Computer Architecture 36 36

Scalable Approach: Directories Every memory line has associated directory information keeps track of copies of cached lines and their states on a miss, find directory entry, look it up, and communicate only with the nodes that have copies if necessary in scalable networks, communication with directory and copies is through network transactions Many alternatives for organizing directory information CSC 631: High-Performance Computer Architecture 37 37 Directory Protocol Each line in cache has state field plus tag Stat. Tag Data Interconnection Network Each line in memory has state field plus bit vector directory with one bit per processor Stat. Directry Data Directory Controller Directory Controller Directory Controller Directory Controller DRAM Bank DRAM Bank DRAM Bank DRAM Bank Assumptions: Reliable network, FIFO message delivery between any given source-destination pair CSC 631: High-Performance Computer Architecture 38 38

States For each cache line, there are 4 possible states: C-invalid (= Nothing): The accessed data is not resident in the cache. C-shared (= Sh): The accessed data is resident in the cache, and possibly also cached at other sites. The data in memory is valid. C-modified (= Ex): The accessed data is exclusively resident in this cache, and has been modified. Memory does not have the most up-to-date data. C-transient (= Pending): The accessed data is in a transient state (for example, the site has just issued a protocol request, but has not received the corresponding protocol reply). CSC 631: High-Performance Computer Architecture 39 39 Home directory states For each memory line, there are 4 possible states: R(dir): The memory line is shared by the sites specified in dir (dir is a set of sites). The data in memory is valid in this state. If dir is empty (i.e., dir = ε), the memory line is not cached by any site. W(id): The memory line is exclusively cached at site id, and has been modified at that site. Memory does not have the most up-to-date data. TR(dir): The memory line is in a transient state waiting for the acknowledgements to the invalidation requests that the home site has issued. TW(id): The memory line is in a transient state waiting for a line exclusively cached at site id (i.e., in C-modified state) to make the memory line at the home site up-todate. CSC 631: High-Performance Computer Architecture 40 40

Read miss, to uncached or shared line Load request at head of -> queue. Load misses in cache. Send ShReq message to directory. 1 2 3 Update cache tag and data and return load data to. 9 8 ShRep arrives at cache. Interconnection Network Message received at directory controller. 4 Directory Controller DRAM Bank 7 Send ShRep message with contents of cache line. 6 Update directory by setting bit for new processor sharer. Access state and directory for line. Line s state is R, with zero or more sharers. 5 CSC 631: High-Performance Computer Architecture 41 41 Write miss, to read shared line Store request at head of -> queue. Store misses in cache. Send ExReq message to directory. 1 2 3 Update cache tag and data, then store data from 12 ExRep arrives at cache 11 Invalidate cache line. Send InvRep to directory. Multiple sharers InvReq arrives at cache. 8 7 ExReq message received at directory controller. InvRep received. Clear down sharer bit. 9 4 Interconnection Network Directory Controller DRAM Bank 10 When no more sharers, send ExRep to cache. 6 Send one InvReq message to each sharer. Access state and directory for line. Line s state is R, with some set of sharers. 5 CSC 631: High-Performance Computer Architecture 42 42

Concurrency Management Protocol would be easy to design if only one transaction in flight across entire system But, want greater throughput and don t want to have to coordinate across entire system Great complexity in managing multiple outstanding concurrent transactions to cache lines Can have multiple requests in flight to same cache line! CSC 631: High-Performance Computer Architecture 43 43