shared memory systems
play

SHARED MEMORY SYSTEMS Mahdi Nazm Bojnordi Assistant Professor - PowerPoint PPT Presentation

SHARED MEMORY SYSTEMS Mahdi Nazm Bojnordi Assistant Professor School of Computing University of Utah CS/ECE 6810: Computer Architecture Overview Shared memory systems Inconsistent vs. consistent data Cache coherence with write back


  1. SHARED MEMORY SYSTEMS Mahdi Nazm Bojnordi Assistant Professor School of Computing University of Utah CS/ECE 6810: Computer Architecture

  2. Overview ¨ Shared memory systems ¤ Inconsistent vs. consistent data ¨ Cache coherence with write back policy ¤ MSI protocol ¤ MESI protocol ¨ Memory consistency ¤ Sequential consistency

  3. Recall: Shared Memory Systems ¨ Multiple threads employ a shared memory system ¤ Easy for programmers ¨ Complex synchronization mechanisms are required ¤ Cache coherence n All the processors see the same data for a particular memory address as they should have if there were no caches in the system n e.g., snoopy protocol with write-through, write no-allocate n Inefficient ¤ Memory consistency n All memory instructions appear to execute in the program order n e.g., sequential consistency

  4. Snooping with Writeback Policy ¨ Problem: writes are not propagated to memory until eviction ¤ Cache data maybe different from main memory ¨ Solution: identify the owner of the most recently updated replica ¤ Every data may have only one owner at any time ¤ Only the owner can update the replica ¤ Multiple readers can share the data n No one can write without gaining ownership first

  5. Modified-Shared-Invalid Protocol ¨ Every cache block transitions among three states ¤ Invalid: no replica in the cache ¤ Shared: a read-only copy in the cache n Multiple units may have the same copy ¤ Modified: a writable copy of the data in the cache n The replica has been updated n The cache has the only valid copy of the data block ¨ Processor actions ¤ Load, store, evict ¨ Bus messages ¤ BusRd, BusRdX, BusInv, BusWB, BusReply

  6. MSI Example Load/BusRd invalid shared P1 P2 Load I I BusRd BUS BusReply

  7. MSI Example BusRd/[BusReply] Load/BusRd invalid shared Load/-- P1 P2 Load S I BusRd BUS

  8. MSI Example BusRd/[BusReply] Load/BusRd invalid shared Evict/-- Load/-- P1 P2 Evict S S BUS

  9. MSI Example BusRd/[BusReply] Load/BusRd BusRdX/[BusReply] invalid shared Evict/-- Load/-- Store/BusRdX P1 P2 Store S I modified BUS Load, Store/--

  10. MSI Example BusRd/[BusReply] Load/BusRd BusRdX/[BusReply] invalid shared Evict/-- Load/-- Store/BusRdX BusRd/BusReply P1 P2 Load I M modified BUS Load, Store/--

  11. MSI Example BusRd/[BusReply] Load/BusRd BusInv,BusRdX/[BusReply] invalid shared Evict/-- Load/-- Store/BusRdX BusRd/BusReply P1 P2 Store S S Store/BusInv modified BUS Load, Store/--

  12. MSI Example BusRd/[BusReply] Load/BusRd BusInv,BusRdX/[BusReply] invalid shared Evict/-- Load/-- BusRdX/BusReply Store/BusRdX BusRd/BusReply P1 P2 Store M I Store/BusInv modified BUS Load, Store/--

  13. MSI Example BusRd/[BusReply] Load/BusRd BusInv,BusRdX/[BusReply] invalid shared Evict/-- Load/-- BusRdX/BusReply Store/BusRdX BusRd/BusReply P1 P2 Evict I M Store/BusInv BusWB modified BUS Load, Store/--

  14. Modified, Exclusive, Shared, Invalid ¨ Also known as Illinois protocol ¤ Employed by real processors ¤ A cache may have an exclusive copy of the data ¤ The exclusive copy may be copied between caches ¨ Pros ¤ No invalidation traffic on write-hits in the E state ¤ Lower overheads in sequential applications ¨ Cons ¤ More complex protocol ¤ Longer memory latency due to the protocol

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend