Chapter 12: Physical Storage Systems

Classification of Physical Storage Media

  • Volatile Storage: Loses contents when power is switched off, e.g., RAM.
  • Non-Volatile Storage: Contents persist even when power is switched off.
    • Includes secondary and tertiary storage, battery-backed main-memory.
  • Factors affecting choice of storage media:
    • Speed of data access
    • Cost per unit of data
    • Reliability

Storage Hierarchy

  • Cache: Fastest media, volatile.
  • Main Memory: Fast, volatile.
  • Flash Memory: Non-volatile, moderate speed.
  • Magnetic Disk: Non-volatile, moderately fast access time.
  • Optical Disk: Non-volatile, slower compared to disks.
  • Magnetic Tapes: Non-volatile, slowest access time, mainly used for archiving.

Storage Interfaces

  • SATA (Serial ATA):
    • SATA 3 supports speeds up to 6 gigabits/sec.
  • SAS (Serial Attached SCSI):
    • SAS Version 3 supports 12 gigabits/sec.
  • NVMe (Non-Volatile Memory Express):
    • Supports speeds up to 24 gigabits/sec.
  • Disks connections:
    • Directly to computer or via Storage Area Networks (SAN) and Network Attached Storage (NAS).

Magnetic Hard Disk Mechanism

  • Read-Write Head: Operates over circular tracks on a platter.
  • Each track divided into sectors, with typical sector size being 512 bytes.
    • 500 to 2000 sectors per track depending on inner/outer tracks.
  • Disk Controller: Interfaces between computer and disk drive.
    • Manages read/write commands and checks data integrity.

Performance Measures of Disks

  • Access Time: Time from request to data transfer.
    • Seek Time: Time to reposition the arm.
    • Rotational Latency: Delay waiting for the sector to appear under the head.
  • Data Transfer Rate: Rate at which data can be read/written, typically 25 to 200 MB/s.
  • Disk Block: Logical unit for storage allocation, typically 4 to 16 KB.
  • Random Access Patterns: Each access requires movement and may reduce transfer rates.

Flash Storage

  • NAND Flash: Widely used, requires page-at-a-time read (512 bytes to 4 KB).
    • Page read time: 20 to 100 microseconds.
  • Solid State Disks (SSD): Utilize block-oriented disk interfaces with high transfer rates (up to 3 GB/sec with NVMe).

SSD Performance Metrics

  • Random Read/Write IOPS:
    • 4 KB reads: 10,000 IOPS, writes: 40,000 IOPS.
    • SATA: 400 MB/s; NVMe: 2-3 GB/s.

RAID (Redundant Arrays of Independent Disks)

  • Purpose: Manage many disks for improved speed and reliability through redundancy.
    • Higher chance of disk failure when many disks are used.
  • RAID Levels:
    • RAID 0: Striping with no redundancy.
    • RAID 1: Mirrored disks.
    • RAID 5: Block-level striping with distributed parity.
    • RAID 6: Similar to RAID 5 but with double redundancy.
  • Factors for Choosing RAID:
    • Cost, performance metrics during normal and failure operations.

Hardware Issues in RAID

  • Software RAID: Implemented without special hardware.
  • Hardware RAID: Requires specialized hardware for redundancy.
  • Latency Issues: Latent failures can damage previously written data.
  • Data Scrubbing: Regular monitoring for latent failures.
  • Hot Swapping: Replacement of disks while the system is running to reduce downtime.

Optimization Techniques

  • Buffering: Caching disk blocks in memory to enhance access speed.
  • Read-Ahead: Anticipating future requests by pre-loading data blocks.
  • Disk Arm Scheduling: Algorithms like the elevator algorithm optimize access time by minimizing arm movement.

Magnetic Tapes

  • Characteristics: Holds large volumes but with slow access times; used mainly for backups.
  • Formats: Ranging from digital audio tapes (DAT) to Ultrium formats with considerable capacity.
  • Usage: Generally offline backups and for transferring large data sets.