Cache (L1 Cache, L2 Cache, L3 Cache)
For a PC Cache refers to smaller, faster memory the CPU uses in order to access commonly used data faster than it can access data held in RAM. Processors check cache before main memory, in order to speed up processes such as instruction execution and data manipulation.
Modern computers contain three separate cache:
- Instruction Cache which speeds up instruction fetches, thus speeds up instruction execution
- Data Cache which speeds up retrieving and storing data
- Translation Buffer which speeds up data translation from physical to virtual addresses (from storage in main memory to storage in the hard drive virtual memory)
L1 Cache (Level 1 Cache,) also called the internal cache, is memory built into the processor, which the processor uses to store data it recently accessed. This is also called the primary cache, because it is the cache nearest to the CPU.
Processors organize L1 Cache in two ways:
- One cache holds both instructions and data
- L1 Cache split into equal parts, one holds data while the other holds instructions
Neither type is inherently faster than the other.
Older processors had no L1 Cache, while newer processors have larger cache up to 64MB. Intel's I7 processor has a 64K L1 Cache split into equal parts for data and instructions.
Secondary cache, or L2 Cache (Level 2) is slower than L1 Cache but larger. When the CPU doesn't find data in the L1 Cache, it next looks to the L2 Cache. It then copies data from L2 Cache to L1 Cache. L2 Caches treat the data in two different ways:
- Inclusive – When the CPU copies data to L1 Cache, L2 Cache retains the data
- Exclusive – When the CPU copies data to L1 Cache, L2 Cache loses the data
L2 Cache, in modern computers, buffers data and instructions for future CPU operations. It is unified rather than separated into data and instruction portions. Engineers have decreased the size of CPUs, thus increasing their speed, by decreasing the size of L2 (and L1) Cache. Intel's I7 has a 256K L2 Cache.
L2 Cache resides either on the microprocessor core (on-die,) on the microprocessor but outside the core (backside,) or on the motherboard. Newer computers and microprocessors have the L2 Cache on the microprocessor.
L3 Cache is cache on the motherboard, outside the CPU, when the CPU contains the L2 Cache (on-die or backside.)
CPUs first check the cache, in order, then the RAM for data and instructions. This operation follows the system's physical configuration:
CPU-->L1 Cache-->L2 Cache-->L3 Cache-->RAM
Caches employ a associativity, a concept which determines where in the cache data from a particular RAM memory address goes. Associativity has two competing priorities – seek time and accuracy.
- In fully associative cache, a replacement policy selects any location on the cache for any entry from main memory.
- In a direct mapped cache, a replacement policy has no choice but to place data from one particular main memory location in a particular location on the cache.
- In N-way associative cache, a replacement policy chooses from between N places for data from a particular main memory location.
Fully associative is the fastest, while direct mapped is the most accurate.
World Data Products can save you money on used or refurbished computer equipment such as servers. Visit http://wdpi.com/ for details.

Cache










