Cache Memory: The Basics

Can you remember what your 5th grade teacher’s name was? Can you remember what you had for dinner last night? While these questions are both trying to access your memory, your brain is not going to look for the answers in the same place. It will need to access different forms of memory. Much like humans, computers also have long-term and short-term memory. We know about DRAM memory (dynamic random access memory) and how it holds much of the computer’s long-term memory. But what about short-term? This is where cache memory comes into play.

What is it?

Cache memory or SRAM (static random access memory) is a component of a computer that acts as temporary storage for data that can be accessed by the CPU much faster than if the CPU was trying to get this data elsewhere.  It is usually on the CPU itself or is a chip on the motherboard with its own separate BUS to connect to the CPU or it can go by the name CPU memory because of how interlinked it is with the processor.  Cache memory, when compared to RAM memory, is smaller and more expensive but it makes up for that with raw processing power. Up to 100 times faster than DRAM memory. This is wildly helpful in increasing the computer’s speed and efficiency.

Hits and Misses

So how does cache memory work? When the CPU requires data it will check in with the cache memory to see if it contains a reference to that data from the RAM memory address. If it does, it will then pull that data from the cache memory instead of from RAM.  This is called a cache hit.  If the processor cannot find the data it is looking for in cache, it will then go on to the standard RAM which takes longer. This is called a cache miss.

Primary / Secondary / Levels

There are two different types of cache memory: primary and secondary.  Primary cache memory is found on the CPU itself whereas secondary cache memory is found on a separate chip close to the CPU. Although, as time has progressed, the secondary cache has become rather obsolete as most caches are found on the CPU. There are 3 different levels of cache memory that can be on a motherboard: 

  • L1: Extremely small and is located on the CPU itself. It is extremely fast but houses only around 32KB of data per core.
  • L2: Can be located on the CPU or rarely on its own chip near the CPU. Larger than L1 but not as fast.
  • L3: While slower than L1 and L2, it is double the speed of standard DRAM.

These are the basics of cache memory. If you have any other questions feel free to connect with any of the support team at General Technics and they would be more than pleased to help further.