To function correctly, a computer needs to store data. The data generated by running programs is often stored in storage devices called memory. There are two main types of memory:
Volatile memory: This is the type of memory that holds data as long as it is powered. As soon as it is shut down, all the data is erased.
Non-volatile memory: This type of memory permanently stores data. Power loss does not affect the data stored in it.
Random Access Memory (RAM) is a type of volatile memory. It provides two-way data access, i.e., read and write operations for the data stored inside.
RAM can be divided into two main types, which differ in how they store data electronically. The two types are:
Dynamic RAM (DRAM): This is typically slower than SRAM and costs less. This is the type of RAM that is mostly used in computers.
Static RAM (SRAM): This is typically faster than DRAM and costs more. It also consumes more power. This is mainly used as cache memory for the CPU.
DRAM can be further divided into different types. The two commonly used types are:
DDR SDRAM: This stands for Double Data Rate Synchronous DRAM. This is the primary type of memory used in different types of computers nowadays. The two most common types of DDR SDRAM in use today are DDR4 and DDR5. DDR5 is fairly new and is significantly faster than DDR4. However, it is very expensive.
GDDR SDRAM: This stands for Graphics Double Data Rate Synchronous DRAM. This type of RAM is mainly designed for video and graphics processing, and can be found in GPUs. It is also divided into different types that are mainly dependent on generational upgrades. At the time of writing this Answer, GDDR6 is the latest generation that offers the most bandwidth.
Primarily, RAM is used to store running programs. Though primary storage such as an HDD or SSD can also be used to store those programs, RAM offers considerable advantages that make it an ideal candidate.
RAM is considerably faster than an HDD or SSD. This allows it to read and write data from open programs without slowing down the computer. In modern PCs, RAM is connected directly to the CPU, which reads and writes data from the RAM even faster.
RAM uses less power than traditional HDDs. This is especially useful when we put computers in sleep mode, as it keeps the programs open using a minute amount of power.
There are a few disadvantages that make RAM a bad choice for certain situations over HDDs.
RAM is generally more expensive than traditional HDDs and SSDs. This makes it less ideal for storing large amounts of data. For example, at the time of writing this Answer, 256GB of DDR4 RAM costs around
RAM is exponentially smaller than an HDD or SSD. This makes it less ideal for storing large applications. Most PCs have 8 or 16GB of RAM compared to 512GB or 1TB of HDD/SSD storage.
Since RAM is volatile, we cannot use it to store data permanently. Thus, if we need to store data for a long time, we need to store it in an HDD.
Free Resources