Types Of Memory in OS
To know about the types of memory, we must know about the difference between the term storage and memory first. Storage is known as the secondary memory; in this, the data of a computer is kept; some of the examples of storage are devices such as Hard disk drives, Solid state drives, etc. Storage is not that easy to be lost. It is non-volatile. Even when the system is turned off and on, the storage is kept as it is without altering the actual data, which can be important to the user. Some examples of storage devices are Compact disks (CD), Digital versatile discs (DVD), and Blu-ray disks.
The term memory means the primary storage of the computer. Random access memory (RAM) is one example of memory. The memory will process the information. The data is only stored temporarily for a short period of time. Unlike storage, where it is permanent until we delete it, memory is volatile, meaning it is stored for a short period of time for faster access to perform the actions quickly. If the system is turned off, then the data from the memory is lost. The memory only works when there is a running program; the data from the program is stored for some time to access it quicker. Some examples of memory are RAM, Read-only memory (ROM), and magnetic strips.
The capacity of these devices will be different. As we discussed that storage is used to store the data in the computer system for a long period of time, files such as important documents, documents, images, etc. The memory stores the data only for a shorter period of time, so it requires only less capacity of space. So, the memory devices only range from 2GB to 64GB, which is its maximum space; this depends on the specifications. The storage devices can range up to 16GB to 1TB; they can also exceed 1 Tera byte. The storage devices have a massive amount of space because it is used to store the necessary documents in them without any loss. But the memory is only for a temporary time. So, memory devices have less space compared to storage devices.
Types of memory
Memory devices are classified into two types
- Primary memory
- Secondary memory
Let us understand each of the classifications in detail.
Primary memory
Primary memory is the type of memory where the CPU can access the memory directly. This provides faster access time, and this is faster than the speed provided by the cache memory. This type of memory is volatile.
1. Random access memory (RAM)
RAM is a type of memory used in computers that is faster to access by the CPU and is quicker in producing the outcomes. This is best suited for the read-and-write operation by the CPU. This helps in faster manipulation and access of the data that is stored temporarily. There are two types of Random access memory (RAM).
- Dynamic RAM (DRAM): This is a type of memory that is constructed by the semiconductors that are used by the program, which is necessary for the computer to complete its function. This is the most widely used type of RAM; this has faster refresh rates.
- Static RAM (SRAM): This is another type of RAM that is way faster than the DRAM; it uses flip-flops to store the data. This helps in removing the need to refresh the data repeatedly. This is used in cache memory due to less refreshing and more lifetime than in DRAM.
- There are other types of RAM, namely, DDR SDRAM (Double Data Rate Synchronous DRAM). This is an improved and enhanced version of DRAM, which is used to transfer data at faster speeds than DRAM. Another type is DDR 4 SDRAM which is another type of DRAM which provides high bandwidths for the transfer of data for reading and writing the data.
2. Read-only memory (ROM)
This is a type of memory device used in computers; this is a non-volatile type of memory device. This is only used to read the data; no writing operations are done to it. ROM contains the data that is used to power up the computer with its basic needs.
There are 3 types of ROM:
- Programmable ROM (PROM): This is one of the types of ROM that provides additional features to it. Users can program a small amount of code into it of their choice. The programming is done by using a programmer designed for programming PROM
- Erasable ROM (EROM): This type of PROM is made so that the programmed code can be erased and then reused again in future. The erasing process is done in a typical way where a UV light is shined onto the chip.
- Electrically erasable ROM (EEROM): This is also another type of ROM that can be erased and programmed, unlike EROM, where a small amount of electric current is passed to erase the program.
Secondary Memory
This is a type of memory that is not integrated into the CPU; this is an external type of memory. This is used for longer storage of the data for a computer device.
1. Magnetic memory
In this type, the memory is stored in a magnetic material to store the data.
- Floppy disks: These are a type of magnetic memory which is used to store data in circles. These provide very less amount of storage.
2. Optical memory
These types of secondary memory provide larger storage than floppy disks; these are made of a polycarbonate material which is coated with a reflective material.
Compact disks and DVDs are the most common examples; CDs provide about 700MB of storage which can store audio, video, etc.