Back to the 2017 paper

Module 4: Memory Organization

20172m

What do you mean by locality of reference?

Worked SolutionAI Assisted

Locality of Reference:

Principle that memory accesses are clustered, not random — basis for caches and virtual memory.

  • Temporal Locality: Recently accessed locations tend to be accessed again soon (e.g., loops, stack variables). → Keep them in cache.
  • Spatial Locality: If a location is accessed, nearby locations will be accessed soon (e.g., sequential instructions, arrays). → Fetch blocks/lines.

Due to locality, a small fast cache can achieve hit rate ~90-95% and make average access time close to cache speed despite large, slow main memory.

Similar questions

Budget AppAndroid App

Pocketly on Android

Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.