Cache Memory is very fast memory located in between processor and RAM. The CPU uses cache memory to store instruction and data that are repeatedly required to run programs, improving overall system speed .when an information is required by the processor, first, it will look up in a cache memory, and if it is not available in the cache then it will fetch it from the RAM.
Purpose of cache memory:
The main purpose of cache memory is to eliminate the speed difference between the processor register and main memory.
Levels of cache memory:
- L1 (level 1 cache)
- L2 (level 2 cache)
- L3 (level 3 cache)
L1 cache is built into the actual processor core. A processor core is a processing unit which read instruction to perform specific actions.
It is a part of high-speed memory which operates at high speed as CPU. It is very expensive and can store very limited data i.e., 8 to 128-kilobytes. it holds data that the processor needs to execute instructions.
L2 cache pulls information from RAM, which is then accessed by the l1 cache. It is bigger in size and slow er in speed then l1 cache. it can store up to 16 MB data and instruction.
The basic purpose of the l2 cache is to regularly read somewhat large quantities of data from RAM which is then available in the l1 cache.
L3 cache is a specialized memory that worked for hand in hand with l1 and l2 cache to improve computer performance. It is the largest cache and faster than ram but slower than l1 and l2 cache.l3 cache has typically been built into the motherboard while l1 an l2 cache are built into processor .processor firs look for instruction in the l1 cache, and then it checks l2 and l3 cache respectively.