Random access memory (RAM) is a type of primary storage. It allows the user to randomly access any part of the data regardless of its position in roughly the same time. This is not possible using other storage devices such as hard disks, CD’s etc. because they have physical constraints such rotation speeds, arm movements etc.
RAM is mostly volatile i.e. the data in RAM is dependent on the power and as lost when power is switched off. However, there are some non - volatile versions of RAM also available.
There are mainly two types of RAM available i.e. Static RAM (SRAM) and Dynamic RAM (DRAM). Details about these are given as follows:
SRAM is a type of semiconductor memory that uses flip flops to store the bits. SRAM is volatile even though it exhibits data remanence i.e residual data even after repeated deletion attempts.
SRAM is more expensive than DRAM and consequently is used to create the cache while DRAM is used to create the main memory.
It is relatively simple to handle a SRAM.
SRAM is quite expensive. So it is used to create a small cache memory and is not used for main memory.
DRAM is a type of semiconductor memory that uses capacitors to store the bits. The charging and discharging of the capacitor represents 0 and 1 i.e. the two possible values that can be stored in a bit.
The DRAM is a volatile memory i.e. the data in memory is lost when power is switched off. However, it still displays some data remanence. DRAM is low cost compared to SRAM so it is primarily used in main memory.
Some advantages of DRAM are:
Some disadvantages of DRAM are:
RAM is usually used as main memory i.e. temporary storage for computer applications and operations. However it has many other uses as well. Some of these are given as follows:
Operating systems use a part of RAM to implement paging. This leads to an illusion that memory is more than it actually is. This is known as virtual memory. However, paging should only be used to a limit or it results in thrashing.
The RAM disk is a part of the computer RAM that is treated as a hard drive by the system. However, the data in the RAM disk is lost if power is switched off, unless there is a backup power source.
This is created if the contents of a slow ROM are copied into a much faster read/write memory. The memory locations are then switched. This is known as shadowing.