edited by
32,131 views
93 votes
93 votes

Consider a machine with a byte addressable main memory of $2^{16}$ bytes. Assume that a direct mapped data cache consisting of $32$ lines of $64$ bytes each is used in the system. A $50 \times 50$ two-dimensional array of bytes is stored in the main memory starting from memory location $1100H$. Assume that the data cache is initially empty. The complete array is accessed twice. Assume that the contents of the data cache do not change in between the two accesses. 

How many data misses will occur in total?

  1. $48$
  2. $50$
  3. $56$
  4. $59$
edited by

10 Answers

0 votes
0 votes

no need to see complicated answers

A picture is worth of 1000 words

just appreciate the beauty of this image

i hope now its clear

as the array is accessed twice

i have shown misses by $\times$ and hits by tick

–2 votes
–2 votes
80-c ,because a miss is related to cache line.Initially all lines are empty so 32.Then 2500(50×50,size of array)-2048(32×64,size of cache)=452.this requires 7.0625 cachelines so another 8 misses then 2nd time 8 and 8 =16 .net = 56.

81-c , everytime this first 8 line 0-7 are being replaced and a total of 3 times they've been replaced.
Answer:

Related questions

22 votes
22 votes
1 answer
2
30 votes
30 votes
2 answers
3
go_editor asked Apr 23, 2016
9,841 views
Consider the following program segment. Here $\text{R1, R2}$ and $\text{R3}$ are the general purpose registers.$$\begin{array}{|l|l|l|c|} \hline & \text {Instruction} & \...
35 votes
35 votes
5 answers
4
go_editor asked Apr 23, 2016
9,356 views
Consider the following program segment. Here $\text{R1, R2}$ and $\text{R3}$ are the general purpose registers.$$\small \begin{array}{|c|l|l||c|} \hline & \text {Instruct...