Principle of locality:
- Temporal base locality (locality in time):- If an item is referenced then it will tend to be referenced again soon.
- Spatial locality (locality in space): If an item is referenced then items whose addresses are closely similar will tend to be referenced soon.
- Sequentially ( the subset of spatial locality ).
The principle of locality may be exploited implementing the memory of computer as a memory hierarchy, taking benefit of all types of memories.
Method: The level near to processor (the fastest) is a subset of any level further away, and all the data is hold at the lowest level (the slowest).