101成大電機 計算機組織

這有個data space 為32KB的cache, line size =block size=32Bytes = 2^5 Bytes
所以這個cache可以放 32KB/32B = 1K =2^10 blocks

截至目前為止
byte offset = 5 bits
Index = 10 bits

選項(a)中表示有4GB的 memory space are cacheable,代表若用byte address表示的話,有2^32 bytes的空間需要被表示,所以需要32bit當作address。

(a) 32bits的address -10 bits index -5 bits offset= 17
(b),(c) index bit 只受cache影響,10bits
(d) 1GB =2^30 bytes,需要30bits才能表達這麼大的空間,所以tag佔其中30-10-5=15bits,類似(a)


文章網址: https://www.ptt.cc/bbs/Grad-ProbAsk/M.1515472052.A.585.html

留言

這個網誌中的熱門文章

交大102計算機系統#14 Hoare Monitor

pip install pesq pypesq error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/