I am struggling with this question as I am not sure whether the answer that has been provided is correct or not. The image should be sufficient to tell the question.
The attached image is of the answer. For the question, imagine all but the first two columns are empty.enter image description here
Here's what I am struggling with:
1. Why is when the address 8500 referenced, a "miss". From my understanding, since it shares the same tag and index value with the address 8496, it should be a "hit".
2. Why is it a "miss" when the address 304 is referenced again. Since it was a "miss" the first time, it would have been loaded in the cache and then when called again it should be a "hit". Is this not how it works?

  • $\begingroup$ 1: no-write-allocate means the write to 8496 does not insert a cache block. 2: two other blocks were inserted at the same index between 304 references, in a 2-way LRU cache this means a conflict miss. $\endgroup$
    – user4577
    Dec 7, 2022 at 14:31
  • $\begingroup$ @PaulA.Clayton Oh yeah that makes sense. I completely missed the no-write-allocate and the second answer also makes things clear. Thank you. $\endgroup$
    – hgmercury
    Dec 8, 2022 at 5:22


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.