retagged by
841 views
6 votes
6 votes

Assume a cache memory with the following properties:

  • The cache size $\text{(C)}$ is 512 bytes (contains $512$ data bytes)
  • The cache uses an LRU (least recently used) policy for eviction.
  • The cache is initially empty.

Suppose that for the following sequence of addresses sent to the cache, $\mathrm{0 , 2 , 4 , 8 , 1 6 , 3 2}$, the hit rate is $\mathrm{0. 3 3}$. Then what is the block size $\text{(B)}$ of the cache?

  1. $\text{B}=4$ bytes
  2. $\text{B}=8$ bytes
  3. $\text{B}=16$ bytes
  4. None of the above.
retagged by

1 Answer

6 votes
6 votes

For (A) the sequence of accesses will result in $\textsf{M H M M M M},$ hit rate $= 0.16$
For (B) the sequence of accesses will result in $\textsf{M H H M M M,}$ hit rate $= 0.33$
For (C) the sequence of accesses will result in $\textsf{M H H H M M},$ hit rate $= 0.5$

Hence, the answer is (B).

Helpful Comment: https://gateoverflow.in/421140/go-classes-test-series-2024-mock-gate-test-13-question-54?show=421376#c421376 

edited by
Answer:

Related questions

992
views
2 answers
9 votes
GO Classes asked Jan 28
992 views
Suppose we use $\textsf{IEEE-754}$ single precision floating point format to represent the numbers in binary. What will be the hexadecimal representation of $-2^{-146}?$$...
501
views
1 answers
5 votes
GO Classes asked Jan 28
501 views
Your code is required to perform the function $(\text{M}\%16) \ast 3.$ What should you do to eliminate multiplication ($\ast$) and mod($\%$), assuming $\mathrm{M}$ is $32...
519
views
1 answers
2 votes
GO Classes asked Jan 28
519 views
In typical RISC ISA, delayed branch executes which instruction irrespective of whether the branch condition is true or false?Instruction immediately following the branch ...
751
views
1 answers
7 votes
GO Classes asked Jan 28
751 views
Consider a processor with an in-order five-stage pipeline (IF, ID, EX, MEM, and WB) with clock cycle time $10 \mathrm{~ns}$. This processor is executing a program in whic...