A+ Certification / Beginners

Working with Cache Memory

Cache memory stores frequently used data and program code after it is read from slower DRAM. Cache memory is made up of SRAM, which is much faster than DRAM. The average speed of DRAM is 60 ns, whereas the average speed of SRAM is 20 ns. If at all possible, you want the CPU's request for information to be serviced by cache memory for a quicker response. To help service these responses, the system has two major levels of cache memory: L1 and L2 that are popular, and also an L3 cache that is making its way on systems today.

L1 cache

Level 1 cache, or L1 cache, is "internal cache" integrated into the CPU. This memory is typically a small amount of SRAM integrated into the processor's chip, giving the processor instant access to this memory with no wait time. Wait time is the amount of time it takes between the processor requesting information stored in memory and actually receiving the information.

Every processor before the Pentium processor has L1 cache integrated into the processor chip, but the amount of L1 cache can vary. For example, the 486 chips had 8K of L1 cache, whereas the early Pentium processors had 16K of L1 cache. Newer processors have doubled that amount to 32K of L1 cache.

L2 cache

Level 2 cache, also known as L2 cache, exists outside the CPU, usually on the motherboard or just outside the processor but in the processor casing. Therefore, some delay occurs when the processor accesses the information in L2 cache due to the distance between the processor and the L2 cache.

One of the selling points of different processors is the amount of cache memory that comes with the processor. Many processors today typically have at least 32K of L1 cache and 512K, 1MB, or 2MB of L2 cache inside the casing of the processor. The more cache memory a system has, the bigger the bucket to store more frequently used information.

When the processor retrieves information, it first checks to see whether the information it needs is stored in L1 cache (because L1 cache has no wait time). If the processor does not find the information in L1 cache, it checks the L2 cache. If the information cannot be found in either L1 or L2 cache, the processor finally retrieves the information from RAM.

L3 cache

Because processors today provide a small amount of L1 cache and a large amount of L2 cache, some people are now using the term L3 cache to identify cache that resides on the motherboard.

If you are confused by L3 cache I can see why - we have changed the terminology on you. In the past, L2 cache resided on the motherboard but now that processors include L2 cache on the CPU, the term for cache memory located on the motherboard is L3 cache!

[Previous] [Contents] [Next]