1 / 15

Memory Hierarchy and Cache Design (4)

Memory Hierarchy and Cache Design (4). Reducing Hit Time. 1. Small and Simple Caches 2. Avoiding Address Translation During Indexing of the Cache Using virtual caches Accessing physical caches without address translation 3. Pipelining Writes for Write Hits. Small and Simple Caches.

nubia
Télécharger la présentation

Memory Hierarchy and Cache Design (4)

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. Memory Hierarchy and Cache Design (4)

  2. Reducing Hit Time 1. Small and Simple Caches 2. Avoiding Address Translation During Indexing of the Cache • Using virtual caches • Accessing physical caches without address translation 3. Pipelining Writes for Write Hits

  3. Small and Simple Caches • Alpha AXP 21064 has • Direct-mapped 8-KB (256 32-byte blocks) L1 instruction cache and date cache • Direct-mapped 128-KB to 8-MB L2 cache • Becomes increasing important due to the pressure of a fast clock cycle

  4. Using virtual caches • Cache is indexed and/or tagged with the virtual address • Cache access and MMU translation/validation done in parallel • Physical address saved in tags for later write-back but not used during indexing virtual address virtual/physical address tags processor data cache miss address mapper physical address main memory

  5. Using virtual caches • Problems with virtual caches • homonym problem • synonym problem

  6. Homonym problem process 1 translation information process 2 translation information 100 10 100 20 process 1 writes 1000 to virtual page 100 100 100 1000 context-switched to process 2 tag data process 2 read from virtual page 100

  7. Homonym problem Solutions to homonym problem 1. Cache perging at each context switch 2. Using PID (process id) as an additional tag 3. Virtually-index physically-tagged caches

  8. Homonym problem

  9. Synonym problem process 1 translation information 100 10 200 10 process 1 reads from virtual page 100 process 1 reads from virtual page 200 process 1 writes 10 to virtual page 100 process 1 reads from virtual page 200 100 5 100 5 200 5 100 10 200 5 tag data

  10. Synonym problem Solutions to synonym problem 1. Hardware anti-aliasing 2. Alignment of synonyms (require all the synonyms to be identical in the lower bits of their virtual addresses assuming a direct-mapped cache)

  11. Accessing physical caches without address translation virtual page # page offset set index cache Tags Data set select Address mapper k-way cache output Latch Latch Latch real address Pipeline stage boundary compare compare To Processor cache data (if cache hit)

  12. tag comparison tag comparison actual writing actual writing Pipelining Writes for Fast Write Hits Write request i - 1 Write request i Write request i + 1 tag comparison Write request i - 1 Write request i Write request i + 1 actual writing Time

  13. Pipelining Writes for Fast Write Hits

  14. Summary of Cache Optimizations

  15. Summary of Cache Optimizations

More Related