Memory timing: Difference between revisions
From Rice Wiki
m (Rice moved page Cache to Memory timing) |
No edit summary |
||
Line 12: | Line 12: | ||
Note that if memory is not in main, it must be in virtual | Note that if memory is not in main, it must be in virtual | ||
= Cache = | |||
Fastest, ideally predict the future to put needed stuff into the cache using spatial and temporal locality. | |||
A cache is organized into S sets, each address mapping to exactly one set. | |||
* Direct mapped: 1 block per set | |||
* N-way set associative: N blocks per set | |||
* Fully associative: all cache blocks in 1 set | |||
The '''tag''' is used to detect misses. | |||
'''Compulsory misses''' cannot be prevented. |
Revision as of 15:38, 3 June 2024
Keep recently accessed data in higher levels of memory hierarchy (i.e. use better memory).
Hit or miss
Hit is when data is found in that level of memory hierarchy. Miss is the complement.
Average memory access time
Note that if memory is not in main, it must be in virtual
Cache
Fastest, ideally predict the future to put needed stuff into the cache using spatial and temporal locality.
A cache is organized into S sets, each address mapping to exactly one set.
- Direct mapped: 1 block per set
- N-way set associative: N blocks per set
- Fully associative: all cache blocks in 1 set
The tag is used to detect misses.
Compulsory misses cannot be prevented.