Processor Cache Tutorial

Processor Cache Tutorial thumbnail
Processor cache is built right onto the chip.

Processor cache is a form of very high-speed RAM that acts as a small buffer between the processor and main memory in modern computers. Processor cache runs at the same clock speed as the processor, which is much faster than the system bus speed at which main memory runs. The processor cache controller reads small segments of main memory into the processor cache before the processor actually calls for it, and this operation significantly speeds up operations when it works, which is typically about 90 percent of the time on optimized code.

Instructions

    • 1

      Main memory consists of various types of dynamic random access memory (DRAM) modules, which run at the system bus speed and needs to be refreshed constantly using a clock signal and a complex controller to avoid data loss. DRAM is fairly inexpensive but much slower than the processor, so when the processor is running at full capacity, the DRAM has a hard time keeping up with requests and must often sit idle while memory operations are performed.

    • 2

      Processor cache memory consists of static random access memory (SRAM). SRAM is significantly more expensive than DRAM, but has two big advantages. SRAM does not need to be refreshed, which means it can retain data without needing to be refreshed as long as the power is on. SRAM is also able to run at much higher speeds, typically running at the same speed as the processor.

    • 3

      Processor cache is implemented as a part of the processor in most cases, using a dual-layer approach termed L1 and L2. L1 cache is located right inside the processor itself, and is limited in size. L1 cache holds the most likely memory information that the processor will need for the next instruction. L2 cache is located inside the processor housing, but not inside the processor itself, and is much larger than L1 cache. L2 cache holds the data from DRAM the L1 cache is likely to want next.

    • 4

      Processor cache is not always accurate in predicting what information will be needed next. When the processor cache has the information that is needed, it is considered a "hit" and when it does not have what is needed, it is considered a "miss." Under typical conditions, the processor cache achieves hits about 90 percent of the time, speeding up the system significantly.

Tips & Warnings

  • More cache is better, and can often make a processor with a slower clock speed perform much faster than a faster processor with less cache.

Related Searches:

References

Resources

Comments

You May Also Like

Related Ads

Featured