You are on page 1of 3

1

Cache Memory
Introduction
In a computer system the program which is to be executed is loaded in the
main memory. Processor then fetches the code and data from the main
memory to execute the program. The DRAMs which from the main memory
are slower devices. So it is necessary to insert wait states in memory read /
write cycles. This reduces the speed of execution. To speed up the process,
high speed memories such as SRAMs. In the memory system small sections of
SRAM is added along with main memory, is referred to as cache memory. It is
the fastest memory in a computer, and is typically integrated onto the
motherboard and directly embedded in the processor or main random access
memory (RAM).Most CPUs have different independent caches, including
instruction and data.

Definition
Cache memory is a small-sized type of volatile computer memory that provides
high-speed data access to a processor and stores frequently used computer
programs, applications and data.

Types of Cache

Primary Cache A primary cache is always located on the processor


chip. This cache is small and its access time is comparable to that of
processor registers.
Secondary Cache secondary cache is placed between the primary
cache and the rest of the memory. It is referred to as the level 2 (L2)
cache. Often, the Level 2 cache is also housed on the processor chip.

How the cache memory works?


Computer in itself cannot work; it needs a program which would instruct its
CPU to carry out its operations. The CPU in turn relies on the RAM to process
any program. The disadvantage with the RAM is there is a data loss due to
any power failure in the system. This unpredictable situation demanded a
stable memory which would retrieve and store the data even when there is
an abrupt turn off to the PC. Whenever any program, stored in the hard disk,
is opened/clicked,
2
Cache Memory

the process gets stored to the RAM memory; the CPU executes the program
from the RAM through a memory controller circuit which is found on the
INTEL processors chipset or in the CPU of AMD processors. The processor,
along with the operating system and chipset, calculates on the data and
instructions that it wants to access in the coming future. The data and the
instructions are set in the cached memory for a quick access/retrieval for the
processor.

The operating system works on the constant update of the cache


memory with more current data and instruction from its main memory. The
process of moving the information from main memory to systems cache
memory is called cacheable memory. In general, most of the systems main
memory cacheable limit is 64MB or more. Any information that is non-
cacheable passes the information directly to the processor without using the
system cache.

The best example for the cache memory would be Word document.
Whenever there is power failure, the unsaved data gets stored on the cached
memory, at the time of the power restore, the user gets option of viewing the
different versions to the data, including the unsaved data for retrieval.

Advantages of Cache Memory :


1. Cache memory is faster than main memory.
2. It stores the program that can be executed within a short period of
time.
3. It consumes less access time as compared to main memory.
4. It stores data for temporary use.
3
Cache Memory

Disadvantages of Cache Memory :


1. It is very expensive.
2. Cache memory has limited capacity.
3. Even after you clear the cache memory, your phone seems to hang.