Zahid Assign
Zahid Assign
Primary memory is a segment of computer memory that can be accessed directly by the
processor. In a hierarchy of memory, primary memory has access time less than secondary
memory and greater than cache memory. Generally, primary memory has a storage capacity
lesser than secondary memory and greater than cache memory.
Main Memory:
The Main memory size is the largest compared to Cache Memory and Register memory, but the
cost is the lowest among them. Main memory can be divided into two main types, viz., Random
Access Memory (RAM), and Read-only Memory (ROM), and each of these is divided into
further sub-types.
Random Access Memory:
It is a volatile type of memory wherein it loses its contents when the power is switched off. The
processor reads instructions/data from it and also writes into it. Data and instructions are loaded
into RAM from the external hard disk, and processed data are stored back into the hard disk.
The data from RAM is read directly in random access mode using memory addresses
irrespective of its length of 16/32/64 bits. Hence the data can be accessed from RAM faster
than external hard disk, and the CPU normally takes 10 nanoseconds to read from RAM.
This memory is costlier than RAM, so the size is restricted to 1 GB in most computers. Each
and every location in RAM is uniquely identified by an address; hence, the processor refers
1
Primary & Secondary Memory
to the instructions or data stored in it, and these addresses are stored in CPU registers during
the runtime.
Figure 1: RAM
Figure 2: ROM
2
Primary & Secondary Memory
When the operating system loads itself then the primary memory of the computer system
holds all the major applications of OS.
Primary Memory runs user-installed application software as well as crucial and very
important files into the system.
SECONDARY MEMORY:
The secondary storage devices which are built into the computer or connected to the
computer are known as a secondary memory of the computer. It is also known as external
memory or auxiliary storage.
The secondary memory is accessed indirectly via input/output operations. It is non-volatile,
so permanently stores the data even when the computer is turned off or until this data is
overwritten or deleted. The CPU can't directly access the secondary memory. First, the
secondary memory data is transferred to primary memory then the CPU can access it.
Secondary memory is used for different purposes but the main purposes of using secondary
memory are:
Permanent storage: As we know that primary memory stores data only when the power
supply is on, it loses data when the power is off. So we need a secondary memory to stores
data permanently even if the power supply is off.
Large Storage: Secondary memory provides large storage space so that we can store large
data like videos, images, audios, files, etc permanently.
Portable: Some secondary devices are removable. So, we can easily store or transfer data
from one computer or device to another.
3
Primary & Secondary Memory
Magnetic tapes
Floppy disks
Paper storage like punched cards or punched tapes
Optical disks like CDs, DVDs, Blu Ray Disks, etc.
4
Primary & Secondary Memory