Slide Set - 04
Slide Set - 04
CPSA & CP
17PG & 17ME
Contents
• Computer Memory
• Primary Memory
• Types of Primary Memory
• RAM (Random Access Memory)
• ROM (Read Only Memory)
• Secondary memory
• Cache
Computer Memory
• Computer memory is the physical device used to store
data and programs (set of instructions) temporarily
or permanently.
Data
+
Programs
Computer Memory
Memory
Primary Secondary
Memory Memory Cache
Holds Data
Holds Data
and Programs Holds Data
and Programs
that are and Programs
that are most
currently that are not
frequently
being currently used
used by the
processed by by processor
processor
the processor
Primary Memory
Set of Instructions
MEMORY
ROM (Read Only Memory)
• It stands for Read Only Memory.
• ROM is physical memory chip which stores special program called BIOS
(Basic Input Output System).
ROM (Read Only Memory)
• BIOS is required to start the computer.
• When ever you turn on/ restart the computer, the very first program that
starts is the BIOS (Stored in ROM).
• POST checks whether all the required hardware is present or not? And all
the hardware attached, is working properly or not?
ROM (Read Only Memory)
• ROM is Read Only, we can only read but can not easily change/update the
contents.
Secondary Memory
• This type of memory is also known as auxiliary/external memory.
• It is slower than main memory.
• These are used for storing data/Information permanently.
• CPU directly does not access these memories. Contents of secondary
memories are first transferred to main memory, and then CPU can access it.
For example : disk, CD-ROM, DVD etc.
• It is known as backup memory.
• It is non-volatile memory.
• Computer may run without secondary memory.
• Slower than primary memories.
Cache Memory
• Cache memory is a very high speed semiconductor memory which can speed
up CPU.
• It acts as a buffer between the CPU and main memory.
• It is used to hold those parts of data and program which are most frequently
used by CPU.
• The parts of data and programs are transferred from disk to cache memory
by operating system, from where CPU can access them.
• Cache memory is faster than main memory.
• It consumes less access time as compared to main memory.
• It stores the program that can be executed within a short period of time.
• It stores data for temporary use.
Cache Memory
• Cache memory has limited capacity.
• It is very expensive.
• Most processors have L1, L2 and L3 (Level 1, Level 2 and Level 3) Cache.
• L1 cache is built inside the microprocessor.
• L2 and L3 cache are located on the microprocessor chip.
• First, microprocessor finds data in cache memory.
• If data is found in cache, it is called as HIT.
• If data is not found in cache, it is called as MISS.
• In case of MISS, microprocessor requests data from RAM.
Cache Memory
CPU HIT
1. First look in cache for data 3. If data is in cache send it to CPU
Cache
2. If data is not in cache fetch from RAM 4. Send data from RAM, write it to cache
and send it to CPU
RAM MISS