I guess it was unnecessary to define and explain about Cache Memory because you can find multitude of internet pages about it. However, I try to be more helpful to make you understand the term and concept behind it. I’ll try to clarify so that you can remember rather than trying to be absolutely correct and formal.
Oh! formal! I will present the formal definition towards the end of this post, but for now, let me try to explain it:
Let me introduce cache memory through why it is needed. Once you understand the problem of speed matching, I hope you’ll understand the concept easier. Find links to further reading at the end of this post should you interest more!
CPU is faster! 🙂
The speed and performance of any computer rely heavily on the speed of CPU. We need faster CPU to make more work done quicker. Generally the speed of modern CPU is measured in Gigahertz (GHz).
Primary Memory is slower! 🙁
As you know RAM is used as primary memory in PCs and the bad thing is that RAM is not as fast as CPU. Generally the speed of modern RAMs are measured in Megahertz (MHz)
What’s the problem? :O)
Now, because RAM is not much faster, no matter how fast the CPU is, it just needs to wait for RAM to finish its task. This will degrade the performance of whole PC. How to solve this problem?
Cash Memory is the solution
Cash memory works in this scenario which bridges the gap in speed between CPU and RAM.
Cache memory (also written as cash memory) is a high speed RAM. It is placed in between CPU and RAM. Because cache memory is much faster it can cope up with the speed of CPU.
Then why do we use RAM? Why not to replace RAM by Cache?
Well, though cache is faster and efficient memory, it is of small size and expensive. If we replace the RAM by cache, probably the cost of PC is going to be not affordable.
Where is cache installed?
Cache memory is sometimes described in levels of closeness and accessibility to the microprocessor. An L1 cache is on the same chip as the microprocessor. (For example, the PowerPC 601 processor has a 32 kilobyte level-1 cache built into its chip.) L2 is usually a separate static RAM (SRAM) chip. The main RAM is usually a dynamic RAM (DRAM) chip.
RAM itself can be viewed as cache for disks
We can think of RAM itself as a cache of memory for hard disk storage because all of RAM’s contents come from the hard disk initially when you turn your computer on and load the operating system (you are loading it into RAM) and later as you start new applications and access new data. RAM can also contain a special area called a disk cache that contains the data most recently read in from the hard disk.
Answer for your exams
Cache memory is a small but high speed memory placed between CPU and RAM so that RAM and Cache together can cope up the speed of CPU. There can be L1, L2 and L3 cache based on the closeness and accessibility to microprocessor. Cache memory in modern computers is usually located on the computer processor chip and not the motherboard though older PCs like 486 had cache in motherboard and expansion board.
Where to find more information about Cache Memory?
- Cache Memory by University of Newfoundland
- CPU Cache in Wikipedia
- Cache by Computer Hope
- How Caching Works? by HowStuffWorks.com