a. Cache Memory:
- It is a small, fast memory that exists between the main memory and the CPU.
- It is much faster than the main memory (access time 10-20 ns).
- There are two types of cache memory i.e., L1 and L2 cache
- L1 cache located with CPU and L2 cache located with RAM.
- It stores instructions and data, which are to be immediately ****.
- It is much costlier than the main memory.
- The Cache Memory capacity is much less than the main memory.
b. Working of Cache memory:
When the program is running, the CPU reads the data/instruction from RAM and stores it in registers. At the same time, it also stores a copy of the data/ instructions in cache memory. The next time, if the CPU needs same data/instruction, it finds it in the cache memory. This helps to enhance the speed of instruction ***** by CPU.
There are two types of cache memory
- Level one (L1) cache
- Level two (L2) cache
1. Level one (L1) Cache:
The cache that comes with the (CPU) processor called Level one (L1) cache. This cache runs at the processor’* clock speed and therefore is very fast. L1 cache is further divided into two sections; one for data and other for instructions.
2. Level two (L2) cache:
It is a much slower cache, which is residing in motherboard (RAM) and delivers slower performance.