Learn the functions of cache and why there are levels to it
What is cache? It’s a small, but very fast memory that’s located next to the CPU’s logic units. Simply put, it’s a storage system that is able to take care of an infinite number of data transactions at the same time. Caches are used to make sure that logic units are always kept busy and are sending and storing data at a fast rate.
The Three Types
1. L1 Cache: Otherwise known as the primary cache, the L1 is the fastest memory in the computer and is closest to the processor. It’s 32 kB in size and hence cannot hold much information. The reason for the small size as the data and instruction caches need to fit together in a compartment that’s the size of a die. Its maximum speed is 5 clock cycles.
2. L2 Cache: Another memory bank that has been built into the CPU chip, and is located in the same module or built on the motherboard. It’s function is to provide data to the L1 cache, which in turn sends it to the processor. L2 speed is slower than the L1’s. It’s bigger than the L1 cache, and that hinders its speed. It needs twice the time to find and transfer the data, compared to the L1.
3. L3 Cache: The Level 3 cache is also built onto the motherboard or is held within the CPU module. It’s duty is to provide data to the L2, and while it’s memory is usually slower than the L2’s memory, it’s faster than the main memory. It’s average speed is around 30 cycles, and it usually happens when a core requires data that’s in a block of cache located some distance away.
(Cover: TechSpot)