×

Search anything:

Types of Storage Devices

Binary Tree book by OpenGenus

Open-Source Internship opportunity by OpenGenus for programmers. Apply now.

In this article, we will take a look at the various Storage Devices that are used in computing cost, applications and their characteristics.

Table of Contents

  1. What is a computer storage
  2. Classification of storage
  3. Primary Memory
    • DRAM
    • SRAM
  4. Secondary Memory
  5. Network Storage

What is a Computer Storage?

A storage device or memory is an essential component of all computers that retain information and data. Even the operating system needs to be stored somewhere. Without storage, a computer is like a car without wheels.

Classification of Storage

Storage can be broadly classified as Primary and Secondary Storage.

classification.png

Primary Memory

Primary memory consists of ROM and RAM and is closely located near the CPU enabling quick access. CPU can directly access the primary memory.

1. RAM (Random Access Memory)

In a Random Access Memory, we can access the data at any random address. RAM is a volatile memory and hence if power is interrupted the data is lost. RAM is very fast and can be used for temporary storage. There are 2 types of Random Access Memory.

  • DRAM (Dynamic Random Access Memory)
  • SRAM (Static Random Access Memory)

Main Memory or DRAM
DRAMs are used to store the data and programs that the CPU immediately needs. A Dynamic RAM (DRAM) is made with cells that store data as the charge on capacitors. Because capacitors have a natural tendency to discharge, Dynamic RAMs require periodic charge refreshing to maintain data storage. This tendency of stored charge to leak away is what gives Dynamic RAM its name.

Traditionally DRAM was Single Data Rate(SSR) that is it can only read/write once in a clock cycle. But newer DRAMs are Dual Data Rate(DDR). DDR is available in different versions such as DDR2, DDR3, DDR4, and the latest being DDR5. Each new version is faster than the previous one.

ram.png

  • Maximum Capacity - 256GB
  • Speed - About 17 to 35 GB/s (for DDR4 depending on clock rate, CPU and motherboard)
  • Cost Per GB - $4 - $10 (for DDR4)
  • Lifetime - does not wear out
  • Application - it serves as working space for the CPU. All executing programs are stored in the ram.

Static RAM (SRAM)
SRAM differs from DRAM in the fact that it can hold the data as long as power is supplied to it without the need to be refreshed. SRAMs are also faster than DRAMs and more expensive. Hence SRAM is used only in a small amount. The 2 important types of SRAM are

  1. Registers
  2. Cache.

Registers
Registers are a small amount of storage that is present within the CPU itself. Most modern CPUs have a few hundred of them. They are used to store instruction, addresses, or data that needs to be immediately used by the CPU. There are several types of registers. Some of the important ones are shown below.

register.png

Registers 1 - N are called General Purpose Registers. They are used to store temporary data during the various arithmetic and logic operations.

  • Maximum Capacity - 64B
  • Speed - fastest
  • Cost Per GB - most expensive
  • Lifetime - does not wear out
  • Application - used to hold data and addresses and in performing arithmetic and logical operations.

The number of registers depends upon the CPU Architecture.

Cache
The next type of storage is cache memory. The cache is usually located in the CPU chip itself or very close to the CPU, so that data can be accessed faster than the RAM. Cache stores frequently used data so that they do not need to be recomputed.

The CPU first searches the cache for the required data or instruction. If it is not available in the cache, it is called a 'cache miss' and the RAM is searched. If it is available in the cache, it is called a 'cache hit'.

Most modern computers use three levels of cache as shown below.

cache.png

L1 cache is smaller but faster than the L2 cache. Similarly, the L2 cache is smaller but faster than the L3 cache.

  • Maximum Capacity - 64KB
  • Speed - 100 times faster than main memory
  • Cost Per GB - very expensive
  • Lifetime - does not wear out
  • Application - stores frequently used data for quicker processing.

2. ROM (Read Only Memory)

In ROM, data can only be read and cannot be re-written. It is a type of non-volatile primary memory and retains information even when power is turned off. Thus it can be used for long-term storage. ROM is typically used for storing the firmware and code required to load the operating system. They have speeds a bit less than RAM.

There are many types of ROM. The three main ones are,

  1. PROM
  2. EPROM
  3. EEPROM

PROM
PROM stands for Programmable Read-Only Memory. It is programmed using a burner or PROM programmer after manufacturing and cannot be reprogrammed again. The PROM programmer blows the fuse switches in PROM which is irreversible.

EPROM
EPROM stands for Erasable Programmable Read-Only Memory. EPROM is similar to PROM but it can be reprogrammed by exposing it to ultraviolet light and then burning it.

EEPROM
EEPROM stands for Electrically Erasable Read-Only Memory. The difference between EPORM and EEPROM is that EEPROM can be erased and reprogrammed by the device it is installed without having to remove it. The number of times it can be reprogrammed is limited to about 100k times.

  • ROM
  • Maximum Capacity - 8MB
  • Speed - bit slower than RAM
  • Cost Per GB - expensive than RAM, depends upon the type of ROM
  • Lifetime - about 100k write cycles for reprogrammable ROM
  • Application - storing BIOS and used in small electronics and microcontrollers.

Seconday Storage

Secondary storage cannot be accessed directly by the CPU. Secondary memory is non-volatile and used to store data permanently. They are relatively cheap compared to primary storage and hence larger. Secondary storage is usually magnetic or optical.

There are various types of secondary storage. Some of the important ones are listed below.

Hard Disk Drives (HDD)
Hard disks are one of the most popular choices for secondary storage. It consists of rotating platters coated with magnetic material and moving read and write heads. The platter is divided into concentric circles called tracks and each track is further divided into a sector. To read or write to a sector, the head must move to the right track and the platter must be rotated to the right sector.
hdd.png

The performance of the HDD depends upon the rotations per minute(RPM). The most common RPMs are 5,400 and 7,200.

  • Maximum Capacity - 18TB
  • Speed - 150 MB/s
  • Cost Per GB - $0.03
  • Lifetime/Duration - Average of 5 years based on usage
  • Application - stores all the programs, system data, operating system etc.

Solid State Drives (SSD)
Solid State Drives are the latest storage technology slowly replacing Hard drives. SSDs make use of NAND flash memory(built using NAND gates and electrically programmable) for storage. SSDs work by reading and writing data on interconnected flash memory chips. They also have a flash controller which controls how data is read and written.

Unlike Hard disks, SSDs have no moving parts and have lower chances of failure. They are also very fast compared to Hard disks and use minimal energy. There are several types of SSDs depending upon the connection interface. Two notable ones are SATA and the newer NVMe which uses the PCIe bus.

ssd.png

SSDs which can be directly plugged into the motherboard is called M.2 SSDs.

  • Maximum Capacity - 18TB
  • Speed - 500 - 3500 MB/s
  • Cost Per GB - $0.058 - $0.086
  • Lifetime/Duration - atleast 10 years. Writes damage SSD over time.
  • Application - similar to HDDs, used for storing programs, system data, operating system etc.

Magnetic Tapes
Magnetic tapes consist of a thin plastic film coated in a magnetic material. It is a sequential data access medium; that means you have to access the data in order. They are mainly used for storing video and audio.

The magnetic tape is subject to degradation and hence not used for long-term storage. Magnetic tapes although losing popularity, are being used for emergent technologies like Artificial Intelligence(AI), Internet of Things(IoT), etc.

  • Maximum Capacity - 10TB
  • Speed - 300 MB/s
  • Cost Per GB - $0.02
  • Lifetime/Duration - 10 - 30 years
  • Application - used in video/audio cassettes, video reels, data mining, IOT etc.

Optical Drives (CD/DVD)
Optical drives use laser beams to read and write data into optical disks. CD stands for Compact Disc and provides storage of up to 700MB. It consists of a polycarbonate disc with pits indented into it which is used to store the data.

DVD stands for Digital Versatile Disc. DVDs are more advanced than CDs providing faster and increased storage of up to 17GB.

An extension of DVD called Blue-ray which uses a violet laser, which allows information to be stored at a greater density than is possible with the longer-wavelength red laser used for DVDs was released in 2006.

  • Maximum Capacity - 128GB (Blue-ray XL)
  • Speed - 4.5 MB/s
  • Cost Per GB - $0.04
  • Lifetime/Duration - 10 - 50 years
  • Application - used for storing high definition video, video games, films etc.

Other secondary storage devices include Pen Drives, Floppy disks, SD cards, etc.

Network Storage

Network storage can also be considered secondary storage. It consists of storage devices connected over the network. It includes Storage Area Network or SAN, Network Attached Storage or NAS, and Cloud Storage.

Storage Area Network (SAN)
SAN consists of multiple storage devices connected over the network and is shared by multiple servers. Each server can access any of the storage devices throughout the network. It can provide a shared pool of storage resources.

  • Maximum Capacity - depends upon the number of storage devices in the network
  • Speed - depends on the network
  • Cost - $100,000 for a small SAN including servers, switches, drives, etc
  • Lifetime/Duration - hard to predict as many drives are involved
  • Application - used for managing huge workloads and enterprise storage

Network Attached Storage (NAS)
Network Attached Storage is kind of like a storage server. Instead of storing the files locally, they are stored in a physically separate storage device connected over the internet.

NAS provides high capacity, ease of access, and reduced cost. It can also be scaled up and down very easily when needed. It is used in distributed systems for sharing data between several computers

  • Maximum Capacity - depends upon the number of bays in NAS storage
  • Speed - depends on the network
  • Cost - atleast $500 (without the disks)
  • Lifetime/Duration - 3 - 5 years
  • Application - used for backing up data, personal cloud, IOT etc

Cloud Storage
Cloud storage provides remote, distributed, scalable, highly available storage over the internet. Storage can be provisioned as needed. Cloud storage also supports the recovery of data in case of a disaster. It uses a pay-per-use model and is offered by most major cloud providers like AWS, Google Cloud, Azure, OneDrive, etc.

The cloud provider is responsible for the security of the data and the management and maintenance of the storage. Cloud storage can be public, private, or hybrid.

  • Maximum Capacity - can be increased or decreased as required
  • Speed - depends on user and providers network speed
  • Cost per GB - $0.015 - $0.030
  • Lifetime/Duration - infinite depending on the cloud provider
  • Application - it is used for providing highly scalable, reliable, and accessible storage over the internet for a variety of applications.

With this article at OpenGenus, you must have the complete idea of Types of Storage Devices.

Types of Storage Devices
Share this