Hello, could someone please help me better understand what a hit and miss are. From what I know:
Cache: Holds copies of the contents of memory
Hit: Find element in cache
Miss: Element not in cache
I'm currently trying to figure out these problems. The solutions were provided, but I tried the problem out myself and still do not understand how solutions were obtained.
A) Direct-mapped cache
8 One-word blocks (initially empty)
Label each reference as hit or miss
Word Addresses: 2,3,11,16,21,13,64,48,19,11,3,22,4,27,6,11
My approach to the solution is in attachment A below.
However, I view the solutions and it says:
***3(2) means that 3 was accessed for the 2nd time
My question is, how are the "contents in block #s" obtained? And why are they all misses?
I am given another similar problem below:
B) Direct-mapped cache
Two-word blocks, Total = 8 words
Block # = quotient of word address/2
Word Addresses: 1,1,5,8,10,6,32,24,9,5,1,11,2,13,3,5
My solution is in the attachment (B) below again, and the solution is:
For this one, how do I know which is a hit and which is a miss? It is indicated that 1(2) is a hit ... but I'm not sure how to differentiate this from everything else?
If anyone could enlighten me, I greatly appreciate it. Thank you!
Cache: Holds copies of the contents of memory
Hit: Find element in cache
Miss: Element not in cache
I'm currently trying to figure out these problems. The solutions were provided, but I tried the problem out myself and still do not understand how solutions were obtained.
A) Direct-mapped cache
8 One-word blocks (initially empty)
Label each reference as hit or miss
Word Addresses: 2,3,11,16,21,13,64,48,19,11,3,22,4,27,6,11
My approach to the solution is in attachment A below.
However, I view the solutions and it says:
***3(2) means that 3 was accessed for the 2nd time
My question is, how are the "contents in block #s" obtained? And why are they all misses?
I am given another similar problem below:
B) Direct-mapped cache
Two-word blocks, Total = 8 words
Block # = quotient of word address/2
Word Addresses: 1,1,5,8,10,6,32,24,9,5,1,11,2,13,3,5
My solution is in the attachment (B) below again, and the solution is:
For this one, how do I know which is a hit and which is a miss? It is indicated that 1(2) is a hit ... but I'm not sure how to differentiate this from everything else?
If anyone could enlighten me, I greatly appreciate it. Thank you!
Attachments
-
269.2 KB Views: 73
-
278.8 KB Views: 75
-
43.2 KB Views: 240
-
45.5 KB Views: 232
Last edited: