Primary Memory and Secondary Memory
1. Primary Memory
- Primary
memory is the main memory of the computer. It is used to store data and
instructions during the processing of data.
- Primary
memory is semiconductor memory.
- Primary
memory is of two kinds: Random Access Memory (RAM) and Read Only
Memory (ROM).
- RAM is
volatile. It stores data when the computer is on. The information
stored in RAM gets erased when the computer is turned off. RAM provides
temporary storage for data and instructions.
- ROM is
non-volatile memory but is a read-only memory. The storage
in ROM is permanent in nature and is used for storing standard processing
programs that permanently reside in the computer. ROM comes programmed by
the manufacturer.
- RAM
stores data and instructions during the execution of instructions. The
data and instructions that require processing are stored in the RAM from
storage devices, like the hard disk. CPU accesses the data and the
instructions from RAM, as it can access it at a fast speed than storage
devices connected to the input and output.
- The
input data that is entered using the input unit is stored in RAM, to be
made available during the processing of data. Similarly, the output data
generated after processing is stored in RAM before being sent to the
output device. Any intermediate results generated during the processing of
a program are stored in RAM.
- RAM
provides a limited storage capacity due to its high cost.
2. Secondary Memory
- The
secondary memory stores data and instructions permanently. The information
can be stored in secondary memory for a long time (years) and is generally
permanent in nature unless erased by the user. It is non-volatile
memory.
- It
provides backup storage for data and instructions. Hard disk drives,
floppy drives, and optical disk drives are some examples of storage
devices.
- The
data and instructions that are currently not being used by the CPU but may
be required later for processing are stored in secondary memory.
- Secondary
memory has a high storage capacity than primary memory.
- Secondary
memory is also cheaper than primary memory.
- It
takes longer time to access the data and instructions stored in
secondary memory than in primary memory.
- Magnetic
tape drives, disk drives, and optical disk drives are different types of
storage devices.