1 / 40

Computer Engineering

Computer Engineering. Rabie A. Ramadan rabieramadan@yahoo.com. Shared Memory Architecture. Shared Memory System Performance degradation due to contention, and coherence problems. Coherence Problem Multiple Copies. Shared Memory Architecture. Simplest Model One memory storage

dicks
Download Presentation

Computer Engineering

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computer Engineering Rabie A. Ramadan rabieramadan@yahoo.com

  2. Shared Memory Architecture

  3. Shared Memory System Performance degradation due to contention, and coherence problems. Coherence Problem Multiple Copies Shared Memory Architecture

  4. Simplest Model One memory storage Accessed by two processors Using two ports CLASSIFICATION OF SHARED MEMORY SYSTEMS

  5. All processors have the same opportunity Sun Starfire servers, HP V series, and Compaq AlphaServer GS. Single Address Space Uniform Memory Access

  6. The access to the memory module depends on its distance from the memory. Non Uniform Memory Access (NUMA)

  7. The shared memory consists of cache memory. D is the remote directory to help in remote cache access Cache-Only Memory Architecture (COMA)

  8. One bus to connect the memories and the processors. Bus contention problem Try to minimize accessing the memory Use the cache Processors usually execute less than an instruction per cycle Superscalar processors executes many instructions per cycle BUS-BASED SYMMETRIC MULTIPROCESSORS

  9. The effective bandwidth = B*I fetches per second Miss rate = V(1-h) For N processors, the miss rate = V(1-h)N Bus saturation case when Performance measure

  10. The maximum number of processors with cache memories that the bus can support is given by the relation: Performance measure

  11. Suppose a shared memory system is constructed from processors that can execute V = 107 instructions/s and the processor duty cycle I = 1. The caches are designed to support a hit rate of 97%, and the bus supports a peak bandwidth of B =106 cycles/s. How many number of processors that can be supported by such organization? What hit rate is needed to support a 30-processor system. Group Activity

  12. Answer

  13. Multiple copies of data, spread throughout the caches, The copies in the caches are coherent if they all equal the same value Problems: Cache–Memory Coherence Cache–Cache Coherence Basic Cache Coherence Problem

  14. The copy of the cache is not coherent with the copy in the memory Solutions: Write through the memory is updated every time the cache is updated, Write update the memory is updated only when the block in the cache is being replaced. Cache–Memory Coherence

  15. Example

  16. Two or more processors read the same data from the memory. Example: P reads X to its cache Q reads X to its cache What happens if P wants to write a new value over the old value of X? Cache–Cache Coherence

  17. Write-invalidate Maintains consistency by reading from local caches until a write occurs. When any processor updates the value of X through a write, posting a dirty bit for X invalidates all other copies. Write-update Maintains consistency by immediately updating all copies in all caches. Cache–Cache Coherence

  18. Example

  19. Snooping protocols are based on watching bus activities and carry out the appropriate coherency commands when necessary. Global memory is moved in blocks Each block has a state associated with it. SNOOPING PROTOCOLS

  20. Multiple processors can read block copies from main memory safely until one processor updates its copy. All cache copies are invalidated and the memory is updated to remain consistent. Write-Invalidate and Write-Through Protocol

  21. Write-Invalidate and Write-Through Protocol

  22. Consider a bus-based shared memory with two processors P and Q as shown in Figure Let us see how the cache coherence is maintained using Write-Invalidate Write-Through protocol. Assume that that X in memory was originally set to 5 and the following operations were performed in the order given: (1) P reads X; (2) Q reads X; (3) Q updates X; (4) Q reads X; (5) Q updates X; (6) P updates X; (7) Q reads X. Group Activity

  23. Answer

  24. a valid block can be owned by memory and shared in multiple caches that can contain only the shared copies of the block. Multiple processors can safely read these blocks from their caches until one processor updates its copy. At this time, the writer becomes the only owner of the valid block and all other copies are invalidated. Write-Invalidate and Write-Back (Ownership Protocol)

  25. Consider the shared memory system of Figure and the following operations: (1) P reads X; (2) Q reads X; (3) Q updates X; (4) Q reads X; (5) Q updates X; (6) P updates X; (7) Q reads X. Group Activity

  26. Answer

  27. uses a combination of write-through and write-back. Write-through is used the very first time a block is written. Subsequent writes are performed using write-back. Write-Once

  28. Consider the shared memory system of Figure and the following operations: (1) P reads X; (2) Q reads X; (3) Q updates X; (4) Q reads X; (5) Q updates X; (6) P updates X; (7) Q reads X. Group Activity

  29. Answer

  30. An update to one cache is written to memory at the same time it is broadcast to other caches sharing the updated block. Write-Update and Partial Write-Through

  31. Consider the shared memory system of Figure and the following operations: (1) P reads X; (2) P updates X; (3) Q reads X; (4) Q updates X; (5) Q reads X; (6) Block X is replaced in P’s cache; (7) Q updates X; (8) P updates X. Group Activity

  32. This protocol is similar to the previous one except that instead of writing through to the memory whenever a shared block is updated, memory updates are done only when the block is being replaced. Write-Update and Write-Back

  33. Consider the shared memory system of Figure and the following operations: (1) P reads X; (2) P updates X; (3) Q reads X; (4) Q updates X; (5) Q reads X; (6) Block X is replaced in Q’s cache; (7) P updates X; (8) Q updates X. Group Activity

  34. Consider the shared memory system of Figure and the following operations: (1) P reads X; (2) Q reads X; (3) Q updates X; (4) Q updates X; (5) P reads X; (6) Block X is replaced in Q’s cache; (7) P updates X; (8) Q updates X. Use the following protocols: Write-Invalidate and Write-Through Protocol Write-Invalidate and Write-Back (Ownership Protocol) Write-Once Write-Update and Partial Write-Through Write-Update and Write-Back Group Activity

More Related