MASIGNASUKAv102
6510051498749449419

What is Cache Memory ? - Learn With AVRK

Add Comments
Monday, August 23, 2021

Concept of Cache Memory

As discussed earlier, the information stored in the main memory (RAM) can be accessed by the processor in a very short period of time, about 60 nanoseconds (ns). But the processor executes that information exactly in 2ns! This means, the processor remains idle for 58ns during execution of one operation. This slows down the processing and reduces the efficiency of a computer machine. The requirement to beat this limitation gave rise to the concept called "Cache Memory". ('cache' is a French word meaning 'to hide')

Cache memory or cache is a small but fastest (access time: 10ns to 30ns) supplementary memory system that temporarily stores frequently used instructions and data during the execution of a program, So that the faster processing can take place.  It is actually an extension of the computer's main memory and random access in nature.

Loading...

In a CPU, there may be multiple caches to speed up the instructions in a loop or to store frequently accessed data. As the microprocessor processes the data, it appears first in the cache memory. If the data founds in the cache memory (can be stored from previous read), Then it doesn't need to look for more in the main memory which consumes more time. If the processor gets the desired data from the cache, it is known as 'Cache-Hit' or if not found, It's called as 'Cache-Miss'.

Sometimes cache memory is described in terms of proximity and level of access to the microprocessor.  They are Level-1 or L1-cache, L2-cache.

L1 Cache 

This cache is built into the exact same microprocessor chip with an access time of about 10ns, very close to the processing time, the size of this cache varies from 4Kbytes to 32KBytes. 

L2 Cache 

This is a separate static RAM (SRAM) chip with an access time of 20 to 30 nanoseconds. The size of  L2 cache varies between 32MB to 1GB. 

The cache described above lies between two subsystems - CPU and Main Memory.  However, caches can also be placed among with the other subsystems. For example the main memory caches the hard disk or CD-ROM. Do you know the hard disk acts as a cache for the internet connection.

Main Memory – This random access memory can sized between 32MB to 2GB, Which has an access time of 60ns. A part of this memory called a disk cache stores the most recently read data from the hard disk. Whenever the same amount of data is needed, the processor does not look for the hard disk, which is much slower than the main memory.

Hard Disk - This magneto-mechanical memory, ranging in size from 1 GB to 120 GB, has an access time of about 12 milliseconds. It acts like cache memory for internet connection.

Also check out this : Storage Units in Computer Science - Learn With AVRK

Learn With AVRK

Learn With AVRK