Presentation is loading. Please wait.

Presentation is loading. Please wait.

Memory Hierarchy and Cache Design (4). Reducing Hit Time 1. Small and Simple Caches 2. Avoiding Address Translation During Indexing of the Cache –Using.

Similar presentations


Presentation on theme: "Memory Hierarchy and Cache Design (4). Reducing Hit Time 1. Small and Simple Caches 2. Avoiding Address Translation During Indexing of the Cache –Using."— 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 processor data virtual/physical address tags main memory address mapper cache miss virtual address physical address

5 Using virtual caches Problems with virtual caches –homonym problem –synonym problem

6 Homonym problem 1001000 1001010020 process 1 translation information process 2 translation information process 1 writes 1000 to virtual page 100 process 2 read from virtual page 100 context-switched to process 2 tagdata 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 100 200 100 200 100 200 5 5 5 10 5 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 process 1 translation information tagdata

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 # compare cache Latch Address mapper page offset Latch compare set index Pipeline stage boundary TagsData cache data (if cache hit) To Processor real address set select k-way cache output

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

13 Pipelining Writes for Fast Write Hits

14 Summary of Cache Optimizations

15


Download ppt "Memory Hierarchy and Cache Design (4). Reducing Hit Time 1. Small and Simple Caches 2. Avoiding Address Translation During Indexing of the Cache –Using."

Similar presentations


Ads by Google