What is a cache memory? Distinguish between L1 and L2 cache.
Ans. A cache is a place to store information that’s faster than the place where the information is usually stored. Cache memory is fast memory that is used to hold the most recently accessed data in slower main memory. The idea is that frequently accessed data will stay in cache, which allows the CPU to access it more quickly, which means it doesn’t have to wait for the data to arrive.
Difference between L1 and L2 cache
L1 cache stores information for use by the processor. L1 cache is extremely quick but also expensive. Most processors have an L1 cache divided into space for data and space for instructions.
L2 cache is the next step down from L1 cache. Most processors today have L2 cache, which increases cache performance. Most desktop processors have an L2 Cache of about 256KB, but some high-end processors can have as much as 2MB.
L1 is primary cache . is the fast memory on CPU. it is build in to the processes . it is very small 8kb to 64kb.and it is fast and run as the same speed as the processed.
L2 secondary cache is larger and slightly slower than L1 cache memory.it is usually 64kb to 2mb in size.
L1 cache is internal to the CPU.
L2 cache is external.