Difference Between Primary and Secondary Memory


Memory is a part of any computer system that is used to store data and instructions. Computer memory is broadly classified into three categories − Primary Memory, Secondary Memory, and Cache Memory.

Primary memory is usually in the form of random access memory (RAM) and is used to store data that the CPU needs to access quickly. Secondary memory is usually in the form of hard drives, solid-state drives, or removable storage devices (such as USB drives) and is used to store data that the CPU does not need to access immediately.

Read this tutorial to find out more about the primary and secondary memory and how they are different from each other.

What is Primary Memory?

Primary memory is one that stores data and instructions which are currently being processed by the system or by the CPU. Primary memory is called the internal memory or main memory. It is a volatile memory, because when the power is switched off, it loses all its data.

The primary memory is relatively faster because the processor can access all its memory cells directly. The primary memory is further classified into two types namely, RAM (Random Access Memory) and ROM (Read Only Memory).

What is Secondary Memory?

Secondary memory is one that used to store data, programs and information permanently on the computer system. It is an external memory of the computer as it is attached through cables to the motherboard of the computer. It is also called auxiliary memory or permanent memory.

Secondary memory is a type of non-volatile memory because it retains the data even if the power is switched off. Examples of secondary memories include hard disc, solid state drive, CD, DVD, pen drive, blue ray disc, SD-Card, etc.

Difference between Primary and Secondary Memory

The following table highlights the important differences between primary and secondary memory −

Parameter

Primary Memory

Secondary Memory

Nature

It comes under the category of volatile and non-volatile memory.

It is a non-volatile memory.

Also known as

It is also known as internal memory.

It is also known as Backup memory or Additional memory or Auxiliary memory.

Data accessibility

The data can be directly accessed by the processing unit.

The data cannot be accessed directly by the processor. It needs to be copied from secondary memory to primary memory first, and then accessed by a CPU.

Types

Primary memory is of two types namely RAM (Random Access Memory) and ROM (Read Only Memory).

The common types of secondary memories are magnetic memory, optical memory, and semiconductor memory.

Speed

Primary memory is faster than secondary memory because it is directly accessible to the CPU.

Secondary memory is non-volatile, which means it retains data even when the power is off.

Volatility

Primary memory is volatile, which means it is wiped out when the computer is turned off.

Since it is non-volatile, data can be retained in case of a power failure.

Use

It can hold data/information currently being used by the processing unit.

It can hold data/information that are not currently being used by the processing unit.

Capacity

The capacity of primary memory is usually within the range of 16 to 32 GB.

It stores a considerable amount of data and information. The capacity of secondary memory ranges from 200 GB to some terabytes.

Accessed through

It can be accessed by a data bus.

It can be accessed using I/O channels.

Cost

It is expensive in comparison to secondary memory.

It is less expensive in comparison to primary memory.

Conclusion

The most important point that you should note here is that the primary memory stores those data and instruction on which the CPU is currently being working, whereas the secondary memory is one that stores data which are not required for current processing. Primary memory is directly accessible to the CPU, while secondary memory is not directly accessible to the CPU and is used to store data that the CPU does not need to access immediately.

Another key difference is that the primary memory is of volatile (RAM) and non-volatile (ROM) types, but the secondary memory is always a non-volatile memory.

Updated on: 11-Jan-2023

14K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements