- Every access to S is a hit.
- Once P is brought to the cache it is never evicted
- At the end of the execution only R and S reside in the cache
- Every access to R evicts Q from the cache
Option :
The correct answer is option 1, option 2, and option 4.
Concept:
The given data,
Cache Memory Size = 2 KB
Main Memory Size = 64 KB
Block Size = 64 B
Calculation:
Number of Lines =Cache Memory Size / Block Size
Number of Lines = 2K/ 64
Number of Lines = 211/26
Number of Lines = 25
16 bit | ||
Tag 5 bit |
Number of lines 5 bit |
Word Offset 6 bit |
The addresses of the first bytes of P, Q, R, and S are,
P | (A248)H | 10100 01001 001000 | 9 th block |
Q | (C284)H | 11000 01010 000100 | 10 th block |
R | (CA8A)H | 11001 01010 001010 | 10 th block |
S | (A262)H | 10100 01001 100010 | 9 th block |
But P&S are from the same memory block (10100).
[ alt="F1 Savita Engineering 28-3-22 D10" src="//storage.googleapis.com/tb-img/production/22/03/F1_Savita_Engineering__28-3-22_D10.png" style="width: 185px; height: 161px;">
Hence the correct answer is option 1, option 2, and option 4.