GATE Computer ScienceVery hardGATE CS (PYQ pattern)

A cache has a 2-cycle hit time. 70% of memory accesses are reads, which miss 5% of the time with a 40-cycle miss penalty. The other 30% are stores, which go into a write buffer and never wait for memory, except that 10% of stores find the buffer full and then wait 8 extra cycles; a store otherwise takes the 2-cycle hit time. What is the average access time in cycles, averaged over all accesses (reads and stores)?

  1. A. 3.40
  2. B. 4.00
  3. C. 3.64
  4. D. 4.24

Correct answer: C. 3.64

Reads: 2 + 0.05 × 40 = 4.0 cycles. Stores: 2 + 0.1 × 8 = 2.8 cycles. Average over all accesses = 0.7 × 4.0 + 0.3 × 2.8 = 3.64. Ignoring the full buffer gives 3.40; averaging over reads only gives 4.00; letting stores also miss like reads gives 4.24.

More Computer Organization and Architecture questions

Exams that ask this topic