Cache Memory Flashcards
Cache Memory
Modern CPUs have multiple sets of ultra-fast static RAM (SRAM) memory built in, called cache. Caches serve as temporary holding areas for data that the CPU has either just worked with or might be asking for in the near future (near future being a relative term, of course, but in this case we are talking a matter of milliseconds).
Normal system RAM is called dynamic RAM (DRAM) because it can hold data only for a very short duration before it needs to be refreshed—that is, so a 1 stays a 1 rather than draining to become a 0. (It’s all just binary, after all!) SRAM, in contrast, never needs to be refreshed and is therefore much faster than DRAM.
Most modern CPUs have three cache levels. The L1 cache is the smallest, fastest, and closest to the CPU core. The L2 cache is next-fastest and next-closest. In a multi-core CPU, each core has its own L1 and L2 cache, and there is typically an L3 cache, a larger pool of SRAM that all the cores share.