edited by
458 views
0 votes
0 votes

A direct-mapped cache has  $2^{10}$ cache lines with  $2^4$ bytes of data per cache line. If the cache is used to store blocks for a byte addressable memory of size  $2^{30}$ bytes, then how many bytes of space will be required for storing the tags?

  1.  $2^{15}$ bytes
  2.  $2^{11}$ bytes
  3.  $2^6$ KB
  4.  $2^7$ KB
edited by

1 Answer

Best answer
2 votes
2 votes
No. of main memory blocks per cache block $=\frac{2^{30}/2^4}{2^{10}} = 2^{16}$.

So, we need 16 bits per cache line to identify which of the $2^{16}$ blocks is currently present in it. And this should be present for each of the $2^{10}$ cache lines making a total tag memory size of $16 \times 2^{10} = 2^{14}$ bits = $2^{11}$ bytes.
selected by
Answer:

Related questions

1 votes
1 votes
3 answers
4