对于具有16 MB可寻址位置的主存储器和每个块16字节的64 KB直接映射的高速缓存的系统,需要多少个标记位。
(A) 4
(B) 14
(C) 8
(D) 12答案: (C)
解释:
Main memory size = 16MB = 2^{24} byte
Cache memory size = 64KB = 2^{16} byte
Word size = 16 bytes = 2^{4} byte = 4 bits in WO.
Number of blocks
= Number of lines
= 2^{16} byte / 2^{4} byte = 2^{12} = 12 bits in LO.
Therefore, tag bits are = 24 - 12 - 4 = 8 bits in tag.
Option (C) is correct.Quiz of this Question