计算机系统结构总结_Memory Hierarchy and Cache Optimization
Posted pdev
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了计算机系统结构总结_Memory Hierarchy and Cache Optimization相关的知识,希望对你有一定的参考价值。
Textbook:
《计算机组成与设计——硬件/软件接口》 HI
《计算机体系结构——量化研究方法》 QR
Ch4. Cache Optimization
本章要讨论的问题就是 How to Improve Cache Performance?
前面讲过 Average memory access time = HitTime + (MissRate * MissPenalty)
那么我们的方向就是Reduce MissRate / HitTime / MissPenalty
1. 6 Basic Cache Optimization(PPT P3)
• Reducing hit time
1. Giving Reads Priority over Writes
• E.g., Read complete before earlier writes in write buffer ??
2. Avoiding Address Translation during Cache Indexing
Cache中使用虚拟地址,这样就可以同时Access TLB和Cache / Access Cache firstly
• Reducing Miss Penalty
3. Multilevel Caches
AMAT = Hit TimeL1 + Miss RateL1 x Miss PenaltyL1
Miss PenaltyL1 = Hit TimeL2 + Miss RateL2 x Miss PenaltyL2
原来Miss PenaltyL1要访问内存,很慢。现在多了L2
• Reducing Miss Rate
4. Larger Block size (Compulsory misses)
...
5. Larger Cache size (Capacity misses)
...
6. Higher Associativity (Conflict misses)
...
2. 11 Advanced Cache Optimizations (PPT P12)
• Reducing hit time
1. Small and simple caches(QR P59)
2. Way prediction
3. Trace caches
• Increasing cache bandwidth
4. Pipelined caches
5. Multibanked caches
6. Nonblocking caches
• Reducing Miss Penalty
7. Critical word first
8. Merging write buffers
• Reducing Miss Rate
9. Compiler optimizations
• Reducing miss penalty or miss rate via parallelism
10. Hardware prefetching
11. Compiler prefetching
3. Main Memory Optimization (PPT P39)
...
以上是关于计算机系统结构总结_Memory Hierarchy and Cache Optimization的主要内容,如果未能解决你的问题,请参考以下文章
计算机系统结构总结_Instruction Set Architecture