GATE Computer ScienceHardGATE CS (PYQ pattern)

A two-level memory has a 32 KB cache costing $100 per KB (access 10 ns) and a 4 MB main memory costing $1 per KB (access 100 ns); total capacity counts both levels (1 MB = 1024 KB). The cache hit ratio is 0.95 and main memory is accessed only after a cache miss. What are the average cost per KB and the average access time?

  1. A. $50.50 per KB; 15.0 ns
  2. B. $1.77 per KB; 14.5 ns
  3. C. $1.78 per KB; 15.0 ns
  4. D. $1.77 per KB; 15.0 ns

Correct answer: D. $1.77 per KB; 15.0 ns

Cost = (32 × 100 + 4096 × 1) / (32 + 4096) = 7296 / 4128 = $1.77. Time = 10 + 0.05 × 100 = 15 ns, since the cache is always looked up first. The simple average of prices gives $50.50; dividing by 4096 KB only gives $1.78; the simultaneous-access formula gives 14.5 ns.

More Computer Organization and Architecture questions

Exams that ask this topic