Back to the 2016 paper

Module 4: Memory Organization

20162m

Define hit ratio and explain its significance.

Worked SolutionAI Assisted

Definition:
Hit Ratio (h)=Number of hitsTotal number of accesses=HitsHits + Misses\text{Hit Ratio } (h) = \frac{\text{Number of hits}}{\text{Total number of accesses}} = \frac{\text{Hits}}{\text{Hits + Misses}}

Miss Ratio=1−hMiss\ Ratio = 1 - h

Where hit = data found in faster memory (Cache), miss = data not found and must be fetched from lower level (Main memory).

Hit ratio is usually expressed for cache: hcacheh_{cache}, also applicable to TLB, etc.

Significance - AMAT (Average Memory Access Time):

The effective access time depends critically on hit ratio:

AMAT=h×Thit+(1−h)×TmissAMAT = h \times T_{hit} + (1-h)\times T_{miss}

or for hierarchical memory:

AMAT=Tcache+(1−h)×TmemoryAMAT = T_{cache} + (1-h) \times T_{memory}

  • High hh (≈\approx 0.9-0.99 due to locality of reference) → AMAT≈TcacheAMAT \approx T_{cache} → system performs near cache speed, despite large cheap main memory.
  • Low hh → AMAT → approaches main memory time, cache is ineffective and penalty dominates.
  • Used to evaluate/design cache: organization, block size, associativity, replacement policy all aim to maximize hh. Helps in deciding cache size vs. cost trade-off and in calculating effective CPU stall cycles due to memory.

Example: Tcache=10nsT_{cache}=10ns, Tmemory=100nsT_{memory}=100ns, h=0.95h=0.95 → AMAT=0.95×10+0.05×(10+100)=14.5nsAMAT = 0.95\times10 + 0.05\times(10+100)=14.5ns vs 100ns100ns without cache.

Similar questions

Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.