Question: The 1 0 8 8 words constitute 6 8 blocks, occuping blocks 0 to 6 7 in the memory. The cache has space for 6

The 1088 words constitute 68 blocks, occuping blocks 0 to 67 in the memory. The
cache has space for 64 blocks. Hence, after blocks 0,1,2,...,63 have been read
from the memory into the cache on the first pass, the cache is full. The next four
blocks, numbered 64 to 67, map to sets 0,1,2, and 3. Each of them will replace
the least recently used cache block in its set, which is block 0. During the second
pass, memory block 0 has to be reloaded into set 0 of the cache, since it has been
overwritten by block 64. It will be placed in the least recently used block of set 0 at
that point, which is block 1. Next, memory blocks 1,2, and 3 will replace block 1 of
sets 1,2 and 3 in the cache, respectively. Memory blocks 4 to 15 will be found in the
cache. Memory blocks 16 to 19, which were in block location 1 of sets 0 to 3, have
now been overwritten, and will be reloaded in block location 2 of these sets.
How do we know that there are four sets

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!