Differences between Primary Memory and Secondary Memory
Primary Memory and Secondary Memory
Primary memory
Primary memory is directly accessible memory used by the CPU to store data and instructions temporarily. The Main memory contains data and programs currently being run on the computer. It is typically high-speed, relatively small, and volatile. It can be accessed immediately and randomly.
Secondary memory
Secondary memory is the storage devices used to store data permanently. It is also known as peripheral storage where the computer stores information that is not necessarily in current use. It is typically slower and has higher storage capacity than primary storage. It is almost always non-volatile. It is slow due to serial access also known as Serial Access Memory.
Differences
Some of the differences between the memory types are as follows:
Primary Memory | Secondary Memory |
Primary memory is volatile memory. Data is lost when power is turned off. | Secondary memory is non-volatile memory. Data remains intact even without power. |
Storage capacity is limited. (often measured in GBs) | Larger storage capacity (measured in TBs). |
Directly accessible memory is used by the CPU to store data and instructions temporarily. | CPU cannot directly access the contents. |
Very fast (compared to secondary memory). | Slower than primary memory. |
The cost is high. | The cost is low. |
Part of CPU. | It is a peripheral device. |
Used to store the data that is under processing. | Used to store all data, instructions, etc. |
Data can be processed directly. Directly accessible by the CPU. | Requires the CPU to use I/O operations for access. |
Examples: Cache memory, RAM, ROM. | Examples: HDD, SSD, USB drives, CDs, DVDs, Blu-ray discs. |