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
2000Questions per year2026
Questions 66–68 of 68
Consider a small two-way set-associative cache memory, consisting of four blocks. For choosing the block to be replaced, use the least recently used (LRU) scheme. The number of cache misses for the following sequence of block addresses is 8, 12, 0, 12,8
Answer: (C)
The cache has blocks, and each set holds blocks.
the cache has sets. The blocks go to the sets like this:
The lowest bit of the block address picks the set. Blocks 8, 12 and 0 are all even, so all go to set 0, which has only 2 slots.
8: miss. Set 0 = {8}.
12: miss. Set 0 = {8, 12}.
0: miss. The set is full and 8 is the least recently used, so 0 replaces 8. Set 0 = {12, 0}.
12: hit.
8: miss. Now 0 is the least recently used, so 8 replaces 0. Set 0 = {12, 8}.
Total misses .
Answer: (C)
the cache has sets. The blocks go to the sets like this:
The lowest bit of the block address picks the set. Blocks 8, 12 and 0 are all even, so all go to set 0, which has only 2 slots.
8: miss. Set 0 = {8}.
12: miss. Set 0 = {8, 12}.
0: miss. The set is full and 8 is the least recently used, so 0 replaces 8. Set 0 = {12, 0}.
12: hit.
8: miss. Now 0 is the least recently used, so 8 replaces 0. Set 0 = {12, 8}.
Total misses .
Answer: (C)
Which of the following is not a form of memory ?
Answer: (C)
The instruction opcode is one part of an instruction. It tells the processor which operation it has to do. So it is not a form of memory, but the other options are.
More than one word are put in one cache block to
Answer: (B)
The answer is to exploit the spatial locality of reference in a program. If the next location is accessed right after, it is already in the cache.
Think of cooking. When you take one ingredient from the cupboard, you also pick the nearby ingredients, hoping you will need them soon.
Correct Answer:
Think of cooking. When you take one ingredient from the cupboard, you also pick the nearby ingredients, hoping you will need them soon.
Correct Answer:
Keep practising