retagged by
879 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

1.0k
views
2 answers
9 votes
GO Classes asked Jan 28
1,033 views
Suppose we use $\textsf{IEEE-754}$ single precision floating point format to represent the numbers in binary. What will be the hexadecimal representation ... $\textsf{0x80000008}$\textsf{0x80000010}$\textsf{0x80000002}$
527
views
1 answers
5 votes
GO Classes asked Jan 28
527 views
Your code is required to perform the function $(\text{M}\%16) \ast 3.$ What should you do to eliminate multiplication ($\ast$) and mod($\%$ ... the result, shift result left by $2,$ and add the saved result to current result.
537
views
1 answers
2 votes
GO Classes asked Jan 28
537 views
In typical RISC ISA, delayed branch executes which instruction irrespective of whether the branch condition is true or false?Instruction immediately following ... to a different a subroutineIt waits till the branch condition is evaluated
782
views
1 answers
7 votes
GO Classes asked Jan 28
782 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 ... branch is taken. What is the throughput (Million instructions per second) of the system?