Cache Memory · Computer Organization and Architecture
68 questions · asked in 25 of 27 years (2000–2026)
MCQ 44 · MSQ 4 · NAT 201-mark 30 · 2-mark 38
Questions 61–65 of 68
Answer: (D)
One iteration reads all banks, each bytes wide: bytes.
Time for one iteration .
A cache block has 64 bytes, and 48 bytes is not enough. Iterations needed . The remaining 16 bytes lie in different banks (banks 0 to 7), so the second iteration is also one parallel access.
Latency .
Answer: (D)
0 5 3 9 7 0 16 55
Assuming that initially the cache did not have any memory block from the current job?
Answer: (C)
The cache maps main memory blocks onto sets. So each set gets blocks. Each set has room for two blocks (-way set).
We have sets, so we need index bits. Also, blocks go to one set, so we need tag bits.
These bits together identify one memory block. The tag bits are placed before the index bits. (Otherwise, adjacent memory references, which show spatial locality, would hurt cache performance.)
Using the two index bits (the lower bits), the blocks go to the sets like this:
Each set has only places. So is thrown out, because it is the least recently used block. The final content of the cache is:
(C) is the answer.
Answer: (A)
A block has 32 bytes, and , so the offset needs 5 bits.
Number of tag bits .
Answer: (A)
4,3,25,8,19,6,25,8,16,35,45,22,8,3,16,25,7
If LRU replacement policy is used, which cache block will have memory block 7?
Answer: (B)
4, 3, 25, 8, 19, 6 go to cache blocks 0 to 5. Then 25 and 8 are hits. 16 goes to block 6 and 35 goes to block 7. The cache is now full:
blocks 0 to 7 hold .
Below, the order lists blocks from least recently used to most recently used. After 35 it is , because the hits on 25 and 8 made them recent.
45 misses and replaces 4 (cache block 0). Order:
22 misses and replaces 3 (cache block 1). Order:
8 is a hit. Order:
3 misses and replaces 19 (cache block 4). Order:
16 is a hit. Order:
25 is a hit. Order:
7 misses and replaces 6, which is in cache block 5.
Answer: (B)
Answer: (C)
Average memory access time
In this formula, and are the search times of the cache and the cache. The question tells us to take them as
So, the average memory access time is
The answer is option C.
Keep practising