What is flash in storage?

Flash storage, also known as flash memory, is a type of non-volatile computer storage media that can be electrically erased and reprogrammed. It is a technology that has become increasingly popular in the past decade, providing faster access speeds and better reliability compared to traditional hard disk drives (HDDs).

How Flash Storage Works

Flash storage devices contain microchips that retain data in the absence of power. These chips contain floating gate transistors, which can store a charge that represents digital data. The transistors resemble standard metal-oxide-semiconductor field-effect transistors (MOSFETs) except with two gates instead of one. The additional gate, known as the floating gate, is between the control gate and the transistor channel and completely isolated by an oxide layer.

To write data to a flash cell, a high voltage is applied to the control gate and drain terminal, allowing electrons to tunnel through the oxide layer onto the floating gate. The electrons become trapped on the floating gate, changing its voltage level and modifying the threshold voltage required to turn on the cell. A charged floating gate represents a binary 1, while an uncharged floating gate represents a 0.

To erase a flash cell, a high voltage of the opposite polarity is applied between the control gate and substrate terminals, allowing the trapped electrons on the floating gate to tunnel back to the substrate through quantum tunneling. This resets the floating gate back to an uncharged state.

Reading the data simply requires detecting the threshold voltage of the cell. If the cell turns on at a low control gate voltage, it has a charged floating gate and represents a 1. If it requires a higher voltage to turn on, it has an uncharged floating gate and represents a 0.

Types of Flash Storage

There are two main types of flash storage:

  • NOR flash – NOR flash allows random access for reading data, but has slow erasure and write speeds. It is commonly used for storing firmware and boot code that needs fast random reads.
  • NAND flash – NAND flash does not allow random access, but has faster erasure and write capabilities. It is used mainly for mass storage devices like SD cards and SSDs where sequential access is required.

NAND Flash

NAND flash architecture arranges cells in a grid with input/output lines accessing each row and column. Accessing data at random locations is slow, but it can read and write sequentially very fast. NAND makes up the core of almost all removable flash storage devices like USB flash drives and memory cards.

There are two subtypes of NAND flash:

  • Single-Level Cell (SLC) – Stores 1 bit per cell, providing better endurance and faster writes
  • Multi-Level Cell (MLC) – Stores 2 bits per cell, allowing for greater densities and lower cost

MLC NAND flash is more common in consumer devices while SLC NAND is used for enterprise storage needing greater reliability and performance.

NOR Flash

The NOR flash architecture connects cells in parallel, allowing each cell to be randomly accessed. Reads are fast, but writes and erases are slow. NOR flash is commonly used to store executable boot code since microprocessors can execute code directly from NOR flash without needing to load it into RAM first.

NOR provides full random access, allowing processors to fetch and execute instruction code randomly rather than sequentially. This makes it suitable for storing firmware, boot data, and applications that require frequent random reads.

Flash Storage vs. HDDs

Compared to traditional spinning hard disk drives (HDDs), flash storage offers significant advantages in performance, power efficiency, durability, and size:

  • Faster access times – Flash storage has microseconds of latency compared to milliseconds for HDDs. This enables much faster boot and load times.
  • Better shock resistance – Flash chips have no moving parts and can withstand vibration, drops, and bumps much better than HDD platters and heads.
  • Lower power consumption – Flash consumes less power allowing better battery life in laptops.
  • Lighter weight – Flash devices are available in compact sizes with no bulky drive mechanisms.
  • Quieter operation – Absence of moving parts allows completely silent operation.

However, flash storage has downsides like lower densities and higher cost per gigabyte compared to HDDs. It also has a limited number of write/erase cycles before cells wear out.

Flash Storage Applications

Some common applications of flash storage include:

  • USB Flash Drives – Small removable devices for transferring and storing documents, photos, media, etc.
  • Memory Cards – Similar to flash drives but in a standardized format for cameras, phones, handheld gaming devices, etc.
  • Solid State Drives (SSDs) – Flash-based hard drive replacements offering much faster speed and durability.
  • eMMC Storage – Embedded flash storage soldered to motherboards in smartphones, tablets, and other compact devices.
  • Boot Media – Flash allows device bootup and launch of OS much faster than HDDs.
  • Caching – Flash is used to cache frequently used data for faster access.

Other enterprise applications taking advantage of flash storage speed include database indexing, data warehousing, HPC storage, and more.

How Flash Storage Works Internally

Inside a flash storage device is a complex controller that manages all the activities like reading, writing, erasing, and mapping data locations. The key internal components include:

  • Flash Translation Layer (FTL) – Maps logical data addresses from the host to physical locations on the flash memory and handles wear leveling.
  • RAM buffer – Improves write speeds by caching incoming writes before programming to flash pages.
  • Read/write circuits – Contains sense amplifiers, high voltage generators, page buffers, and interface logic.
  • Wear leveling – Distributes writes evenly so no single cell wears out faster than average.
  • Bad block management – Maps out any faulty flash pages to avoid using them.
  • Read scrubbing and error correction – Fixes bit errors in stored data using ECC algorithms.

By handling these essential functions, the flash controller optimizes performance, integrity and endurance of the flash memory.

Flash Storage Interface Protocols

There are several main interface protocols used to connect flash storage devices to host systems:

  • SATA – Serial ATA is used for connecting SSDs to computer motherboards using a traditional hard drive form factor.
  • SAS – Serial Attached SCSI is an enterprise interface optimized for SSDs in servers and arrays.
  • PCIe – Peripheral Component Interconnect Express allows SSDs to connect directly to the system bus via PCIe slots.
  • USB – Universal Serial Bus is a common interface for small flash drives and memory cards.
  • SD/microSD – Secure Digital is a specialized slot often used in mobile devices and cameras.
  • CFexpress – CompactFlash Express is a high-speed interface for professional cameras and gaming.
  • eMMC – Embedded MultiMediaCard provides an onboard flash storage directly soldered to mobile device boards.
  • UFS – Universal Flash Storage is a high-speed interface designed specifically for connecting flash memory.

The interface plays a major role in determining the performance capabilities of a flash storage product. Faster buses like PCIe and UFS allow flash storage to maximize its speed advantage over HDDs.

Flash Storage Form Factors

While early flash storage was limited to removable cards and drives, it now appears in a wide variety of form factors to suit different applications. Some common form factors include:

  • USB Thumb Drives – Compact and portable removable flash drive that plugs into any USB port.
  • SD Cards – Postage stamp sized cards in SD, microSD and MiniSD physical sizes.
  • CFexpress Cards – CompactFlash form factor optimized for very high video recording speeds.
  • M.2 SSDs – Small card-like SSDs that connect directly to the motherboard bus via PCIe or SATA.
  • 2.5″ SSDs – Standard laptop drive size, but thinner than HDDs at 7mm or 15mm heights.
  • U.2 SSDs – Enterprise SSD form factor formerly known as SFF-8639 that connects via PCIe.
  • eMMC Chips – Raw NAND flash dies packaged in BGA chips and soldered to device boards.
  • 1″ & 1.8″ Disks – Very small SSDs in compact industrial systems and IoT devices.

Flash Storage Lifespan Considerations

While flash memory has no moving parts and can withstand more abuse than hard drives, the cells do have a limited lifespan. Every flash cell can endure only a certain number of program/erase cycles before wearing out and becoming unreliable.

Typical endurance ratings of commercial NAND flash technology include:

  • SLC NAND – 100,000 write cycles
  • MLC NAND – 10,000 write cycles
  • TLC NAND – 1,000 write cycles

However, modern SSDs use a technique called wear leveling to distribute writes across all cells evenly. This helps prolong the overall lifetime of the drive to typically 5 years or more. SSD lifespans also improve over time as NAND flash processes continue to shrink.

Data Retention

In addition to program/erase cycles, flash cells have a finite data retention time. The stored charge on the floating gate will slowly leak over time, causing data to be lost if left unpowered for years. Most flash is rated to retain data safely for 1 to 10 years at normal temperatures.

End of Life Behavior

As flash cells begin to wear out and fail, storage devices enter a read-only mode where no further writes are allowed. However, all previously written data should still be readable from the device until complete failure. SSDs will tend to fail gradually rather than catastrophically like HDDs.

Emerging Innovations in Flash Storage

Flash storage technology continues to evolve rapidly, with new innovations improving cost, performance and reliability. Some emerging directions include:

  • 3D V-NAND – Stacks memory cells vertically in layers to increase density.
  • QLC NAND – Stores 4 bits per cell to further increase density.
  • NVMe – New optimized protocol built specifically for PCIe/SSDs.
  • Z-NAND – Adds a capacitor to each cell for faster writes and more endurance.
  • Persistent memory – Emerging technology combining DRAM speed with NAND non-volatility.
  • 3D XPoint – New material developed by Intel and Micron for faster phase change memory.

As research yields these and other innovations, flash storage should continue to advance in capabilities while also dropping in cost over time.

Conclusion

In summary, flash storage utilizes floating gate transistors to retain data as an electrical charge when power is removed. It provides major advantages over hard disk drives in speed, size, power efficiency and ruggedness. Flash comes in NOR and NAND types with NAND dominating in mass storage uses like SSDs. While its cells have limited write endurance, wear leveling helps prolong lifespan. Continuing innovation is rapidly improving flash storage across cost, performance and capacity metrics.