+3 votes
in Computer by kratos

Explain cache memory.

1 Answer

+2 votes
by kratos
 
Best answer

a. Cache Memory:

  1. It is a small, fast memory that exists between the main memory and the CPU.
  2. It is much faster than the main memory (access time 10-20 ns).
  3. There are two types of cache memory i.e., L1 and L2 cache
  4. L1 cache located with CPU and L2 cache located with RAM.
  5. It stores instructions and data, which are to be immediately ****.
  6. It is much costlier than the main memory.
  7. 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

  1. Level one (L1) cache
  2. 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.

...