Computer Science, asked by shivanin8147, 1 year ago

What differences between the main memory and the cache memory?

Answers

Answered by anonymous240
4

Both are temporary memories but they vary mainly based on speed, size and cost.

1. Placement: Cache is usually present on the CPU chip itself. Primary memory(RAM) is placed on the motherboard and is connected to the CPU via the Memory Bus.

2. Speed: Because cache is closer to the CPU, it is much faster than RAM. Each read access on the primary memory has to travel via the Memory Bus while the CPU cache is right there.

3. Size: The size of the cache is much less compared to that of primary memory. The size of Primary Memory or RAM in today's computers is a few GBs while the size of cache is a few MBs.

4. Cost: Cache is more expensive than primary memory.

Why to have another temporary memory when we already have cheap and large main memory?

It is mainly to improve speed.

The cache is there to reduce the average memory access time for the CPU.

When the CPU needs some data from the memory, the cache is checked first and if data is available in the cache it gets it from there. There is no need to perform a memory read.

Sometimes cache is divided into two levels called L1 cache(Level 1) and L2 cache(Level 2). L1 is the closest to CPU and also the most expensive. Whenever there is a memory read request, L1 is checked first and then L2 and then the primary memory.

If that helps, please mark my amswer Brainliest

Similar questions