0% found this document useful (0 votes)
10 views

Zahid Assign

Primary memory can be accessed directly by the CPU and includes RAM and ROM. It is used to store active data and instructions being used. Secondary memory includes hard disks, SSDs, and removable storage. It is larger but slower than primary memory and is used for permanent storage of data, applications, and files.

Uploaded by

zahid
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Zahid Assign

Primary memory can be accessed directly by the CPU and includes RAM and ROM. It is used to store active data and instructions being used. Secondary memory includes hard disks, SSDs, and removable storage. It is larger but slower than primary memory and is used for permanent storage of data, applications, and files.

Uploaded by

zahid
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Primary & Secondary Memory

What is Primary Memory

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.

Need of primary memory


In order to enhance the efficiency of the system, memory is organized in such a way that access
time for the ready process is minimized. The following approach is followed to minimize access
time for the ready process.
 All programs, files, and data are stored in secondary storage that is larger and hence has
greater access time.
 Secondary memory can not be accessed directly by a CPU or processor.
 In order, to execute any process operating system loads the process in primary memory
which is smaller and can be accessed directly by the CPU.
 Since only those processes are loaded in primary memory which is ready to be executed,
the CPU can access those processes efficiently and this optimizes the performance of the
system.

Different Types of Primary Memory:


Following are some of the types of primary memory as follows:

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

Read-only Memory (ROM):


A non-volatile type of memory that continues to hold the contents even when the power is
switched off. As per the name, contents can only be read from these memory locations and
cannot be erased or rewritten. Contents like boot programs, firmware, and mathematical tables in
scientific applications are stored during manufacturing and sold with pre-stored contents. These
contents are used during the operation of the device, and they cannot be altered. In modern
computers, Flash memory is used for storing BIOS, Firmware instead of ROM, as it enables
easier version updating.

Figure 2: ROM

Functions Of Primary Memory:


 Primary memory directly communicates with CPU {Central Processing Unit}.
 The data and instructions are stored in memory for further processing.
 The primary memory or main memory holds data and instructions temporarily and
forwards the task for further operations to the CPU.
 The main memory is responsible to hold the data and tasks currently needed for
processing.

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.

Use of Secondary Memory:

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.

Types of Secondary Memory:


It is of two types they are as follows:
Fixed Storage:
The fixed storage is a memory device that is present internally in the system. Furthermore,
they store all the computer data and we can call them fixed disk drives or hard drives.
Generally, all the data of the computer system stores on a fixed storage device. Although we
can separate the devices from the system, it requires a proper engineer to do the task. Since it
is present as an internal hardware component of the system.

3
Primary & Secondary Memory

Examples are as follows:


 Hard Disk Drives (HDD)
 Solid-State Disk (SSD)
 Flash Memory
Removable Storage:
These are external storage devices that store data of a computer. Moreover, we can call them
external drives or removable disk drives. A removable device is basically the one that we can
inject/insert or remove/eject as per our requirement. Besides, we can remove the devices even if
the system is running.
 Furthermore, the data transfer rate is quite faster in comparison to the storage area networks
(SANs). Moreover, it is easy to transfer data from one device to another. Besides, these
devices are portable and handy.

Examples are as follows:

 Magnetic tapes
 Floppy disks
 Paper storage like punched cards or punched tapes
 Optical disks like CDs, DVDs, Blu Ray Disks, etc.

Figure 3: Floppy Disk

4
Primary & Secondary Memory

DIFFERENCES BETWEEN PRIMARY & SECONDARY MEMORY

You might also like