575
技术社区[云栖]
计算机体系结构1_内存类型
一,IA32、INTEL64和AMD64内存类型
1.Uncacheable(UC)
读,写都不会被缓存,适用于设备I/O的内存映射。
2.Cache Disable(CD)
读写命中L1数据缓存,L2缓存,在访问主存之前使cache line失效,如果cache line为脏状态,先将cache line写入主存然后再使cache line失效,之后从主存读数据。
3.Write-Combining(WC)
读写WC内存都不会被缓存,地址连续的多个写WC内存命令会被内部合并在write buffer中,使用于写顺序不重要的设备,如图形卡。
4.Write-Combining Plus(WC+)
读写WC内存都不会被缓存,合并写内存命令在write buffer,访问WC+内存会导致检查所有缓存保持一致性。
5.Write-Protect(WP)
读WP内存会被缓存,读miss时会分配cache line。在写WP内存时,如果缓存命中,不会更新缓存,直接更新主存,然后使命中的cache line失效,
适用于更新需要立即被设备可见。
6.Writethrough(WT)
读WT内存会被缓存,读miss时会分配cache line。所有写WP内存均更新主存,如果缓存命中,更新命中的cache line。写miss不会分配cache line。
7.Writeback(WB)
读WB内存会被缓存,读miss时分配cache line。所有的缓存命中的写WB内存均会更新cache line并且标记cache line脏状态。写WB内存miss会分配cache line,
更新cache line并且标记cache line脏状态。提供最高的性能。
通写(WT)与回写(WB):
1.通写更新缓存和主存。
2.回写更新缓存,不立即更新主存。
参考:
umd CS:
Set Associative Cache https://www.cs.umd.edu/class/sum2003/cmsc311/Notes/Memory/set.html
wiki:
CPU Cache https://en.wikipedia.org/wiki/CPU_cache
AMD64 Architecture Programmer’s Manual Volume 2: System Programming
Intel64 and IA-32 Architectures Software Developer’s Manual Volume 3 (3A, 3B & 3C): System Programming Guide
最后更新:2017-04-03 14:54:04