Understanding cache

Eric

Well-Known Member
Staff Writer
Sep 11, 2013
1,410
481
2,930
I am reading up on operating systems and just want to clarify that the cache is basically a speed boost for the main memory to compensate for its sluggishness compared to the speed of the processor? They're very expensive and would burn out if a computer used only caches instead of main memory, too, right? A cache simply is a means to catch up to the alarming rate processor are developing to keep the price of a computer manageable in comparison to rest of the parts?
 
I've always thought it was wearing frequently loaded info could be restored. Kind of like RAM, but more specialized. Like there might be levels of Cache for the CPU or on the GPU.

This gets a little murky because I think Windows can also have Cache that is set aside as Temp Files or something. That's almost like a Software based cache.
 
I've always thought it was wearing frequently loaded info could be restored. Kind of like RAM, but more specialized. Like there might be levels of Cache for the CPU or on the GPU.

This gets a little murky because I think Windows can also have Cache that is set aside as Temp Files or something. That's almost like a Software based cache.
Haha see, I always thought that was the principle of locality. I need to hit the books harder.
 
but I think you're right. It's like a temporary storage place.
 
I am reading up on operating systems and just want to clarify that the cache is basically a speed boost for the main memory to compensate for its sluggishness compared to the speed of the processor? They're very expensive and would burn out if a computer used only caches instead of main memory, too, right? A cache simply is a means to catch up to the alarming rate processor are developing to keep the price of a computer manageable in comparison to rest of the parts?

Cache is pretty much a bunch of memory on the CPU that it stores data automatically at so that it can be accessed quicker. Cache is made up of SRAM which has both a much higher bandwidth, and also a much lower latency then DRAM. But SRAM has also got a much lower density, so its a trade off your DRAM is far slower to access but you also get far more of it.

Your Cache(SRAM) is far quicker to access but you don't get a lot of it in the same space. So its not that you won't burn out a computer using just cache, its just that you won't have a lot of space to do work in.

Caches are merely another level on the memory hierarchy.

4-hierarchy.jpg
 
Cache is that thing Software Developers tell Testers to clear whenever a problem arises.