Tutorials Logic, IN info@tutorialslogic.com

Storage Management in OS RAID, SSD vs HDD

Disk Structure

A traditional Hard Disk Drive (HDD) consists of:

  • Platters: Circular magnetic disks that store data
  • Tracks: Concentric circles on each platter surface
  • Sectors: Smallest addressable unit on a track (typically 512 bytes or 4 KB)
  • Cylinders: All tracks at the same position across all platters
  • Read/Write Head: Reads and writes data on the platter surface
  • Spindle: Motor that spins the platters (5400, 7200, 10000, 15000 RPM)

Disk Access Time

Total disk access time = Seek Time + Rotational Latency + Transfer Time

Seek time dominates - disk scheduling algorithms aim to minimize total seek time.

Component Description Typical Value
Seek Time Time to move the read/write head to the correct track 3-15 ms
Rotational Latency Time for the desired sector to rotate under the head 0-8 ms (avg ~4 ms at 7200 RPM)
Transfer Time Time to read/write the actual data Very small (microseconds)

SSD vs HDD

Feature HDD SSD
Technology Magnetic platters, mechanical arm NAND flash memory (no moving parts)
Speed (sequential) 100-200 MB/s 500 MB/s - 7 GB/s (NVMe)
Random access Slow (seek time) Very fast (microseconds)
Durability Vulnerable to physical shock More durable (no moving parts)
Noise Audible (spinning, seeking) Silent
Power consumption Higher Lower
Cost per GB Lower (~$0.02/GB) Higher (~$0.08/GB)
Lifespan 3-5 years (mechanical wear) Limited write cycles (TBW)

RAID Levels

RAID (Redundant Array of Independent Disks) combines multiple physical disks into a logical unit for improved performance, redundancy, or both.

RAID Level Description Min Disks Fault Tolerance Use Case
RAID 0 (Striping) Data split across disks for speed. No redundancy. 2 None - any disk failure = total data loss High performance, non-critical data
RAID 1 (Mirroring) Exact copy of data on two disks. 2 1 disk failure OS drives, critical data
RAID 5 (Striping + Parity) Data and parity striped across all disks. Parity allows recovery. 3 1 disk failure File servers, general storage
RAID 6 (Double Parity) Like RAID 5 but with two parity blocks. 4 2 disk failures Large arrays, high availability
RAID 10 (1+0) Mirrored pairs that are then striped. Best of RAID 1 and RAID 0. 4 1 disk per mirrored pair Databases, high I/O workloads

Storage Hierarchy

The storage hierarchy organizes storage by speed, cost, and capacity. Faster storage is more expensive and has less capacity:

Principle of Locality: Programs tend to access a small portion of their address space at any given time (temporal and spatial locality). This is why caching is effective - frequently accessed data is kept in faster storage levels.

Level Type Speed Capacity Volatile?
1 CPU Registers ~1 ns Bytes Yes
2 L1/L2/L3 Cache 1-10 ns KB-MB Yes
3 Main Memory (RAM) ~100 ns GB Yes
4 SSD (NVMe) ~100 us TB No
5 HDD ~10 ms TB No
6 Optical / Tape Seconds TB-PB No

Queue Depth, TRIM, and Failure Domains

SSDs remove seek and rotational delay, but controller queues, flash translation, garbage collection, endurance, and thermal limits still affect latency. TRIM or discard tells the device which blocks no longer hold live data, while overprovisioning and write patterns influence sustained performance.

RAID protects against selected device failures; it does not protect against deletion, corruption, malware, controller mistakes, or site loss. Define the failure domain, monitor rebuild risk, keep independent backups, and test restoration. Compare tail latency and degraded-mode behavior, not only peak sequential throughput.

Storage OS state trace

Storage OS state trace
Event 1: a process requests a resource related to Storage
Event 2: the kernel checks permissions, availability, and current state
Event 3: the scheduler or manager decides whether to run, wait, block, or fail
Event 4: the process observes the result and continues or handles the error

Storage small simulation

Storage small simulation
Input: P1, P2, P3
Resource/state: limited
Rule: apply the Storage policy step by step
Output: show which process runs, waits, completes, or is denied

Always write the before-state and after-state for each step.
Before you move on

Storage Management in OS RAID, SSD vs HDD Mastery Check

4 checks
  • Estimate HDD access from seek, rotational, and transfer time, then contrast SSD latency behavior.
  • Relate registers, caches, memory, local storage, and remote storage to locality and persistence.
  • Compare scheduling and queueing policies under sequential, random, read-heavy, and write-heavy workloads.
  • Choose a RAID level from failure and performance needs while remembering that redundancy is not a backup.

Operating System Questions Learners Ask

Seek time, rotational delay on HDDs, transfer time, and queueing all contribute.

They have no moving head, so physical location has far less effect on access latency.

Depending on the level, it can improve speed, availability, or both, but it is not a backup.

Browse Free Tutorials

Explore 500+ free tutorials across 20+ languages and frameworks.