= The primary storage or the memory is called the main memory in computer system. It is also known as system memory. Primary storage or memory stores data and programs temporarily during the operation of computer.
There are two types of primary memory. They are Random Access Memory (RAM) and Read Only Memory (ROM). Flash memory and cache memory are also the types of primary memory. These memories have great effect on processing speed of computer. The main function of main memory is READ, WRITE and CLEAR.
In memory hierarchy, it is placed in highest position due to high speed, high cost and small size. Processor directly access primary memory.
A memory, which stores data and programs for a long period of time, is called secondary memory. This memory can also be called backup storage memory or mass storage media. Although it is placed in lower position due to low speed, low cost and large size, it has a very large storage capacity.
Floppy disk, Hard Disk, CD-ROM, DVD, Zip Disk, magnetic tape etc are secondary memories used to store data. Now-a-days, operating system and other software, business data and information are stored in CD-ROM.