計算機體係結構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