CPU caches are used by exploiting temporal and spatial locality. My question is who is responsible for managing these caches? Is this Operating system that identifies a particular access pattern and then manages (i.e store the data in) cache, using low level OS function calls?
Asked
Active
Viewed 3,896 times
3 Answers
13
The CPU caches are operational from the very moment on when the CPU is powered up. Neither the BIOS nor an OS are strictly speaking “necessary” to control the caches. The BIOS and the OS can change cache configuration settings in the CPU but they don’t control the normal operation, this is all built into the CPU itself.
uli
- 2,507
- 20
- 21
3
It is totally depends on your hardware platform (For example Nios® II provides some instruction for managing caches). You should read the instruction and assembly language. Some processor provide you some instructions to manage cache in some level. for example WBINVD provides Write back and flush Internal caches; initiate writing-back and flushing of external caches (or INVD).
Reza
- 2,296
- 16
- 17