Storage management
Disk structure, formatting and the storage hierarchy.
Module 5
Session 5.1
Lesson 2 of 3
Storage Management
How the OS organizes, moves, and protects data on secondary storage
Magnetic Disk Anatomy
Click a part · hover for tooltip
Request Path Through the OS
Click each stage
Appread()/write()
→
File Systemnames → blocks
→
Block Layercache / schedule
→
Device Drivercommands
→
Disk Controllerphysical I/O
Pick a stage
See how a student “save file” request travels from the application down to spinning (or solid-state) storage.
Explainer Panel
Start here
What is Storage Management?
The OS must provide a reliable, efficient way for programs to store and retrieve data that survives power-off.
It hides messy hardware details (tracks, sectors, flash pages) behind clean abstractions like files and directories.
Analogy: Think of a library. Books (files) live on shelves (disk blocks). The librarian (OS) finds, places, and protects them so you never walk the aisles yourself.
OS Storage Duties
Click a card for a deeper tip
Space Allocation
Decide which free disk blocks hold a file’s data.
Contiguous, linked, and indexed allocation are classic schemes. Goal: minimize wasted space and seek distance.
Free-Space Tracking
Remember which blocks are empty and reusable.
Bitmaps and free lists answer “where can I put the next block?” quickly after deletes and writes.
Buffering
Hold data temporarily in RAM during transfers.
Disks work in fixed-size blocks. Buffering gathers or splits app data so hardware sees clean block-sized transfers.
Caching
Keep hot blocks in memory to avoid slow disk hits.
A block cache (buffer cache) can turn many disk reads into RAM hits — often 1000× faster on HDDs.
Spooling
Queue jobs for slow devices (classic: printers).
Simultaneous Peripheral Operations On-Line. Apps dump output to disk; a daemon feeds the device later.
Disk Scheduling
Reorder waiting I/O to reduce head movement.
Algorithms like SSTF, SCAN, and C-SCAN cut seek time — the costliest part of HDD access. (Covered deeply in Module 5.)
Access Time Lab (HDD)
Total time ≈ Seek + Rotational latency + Transfer. Drag sliders to see which part hurts most.
Seek
Rotation
Transfer
Total access time: 13.0 ms
Ready. Adjust timings or press “Log to console”.
HDD vs SSD — Why Storage Type Changes Everything
Click a card
Hard Disk Drive (HDD)
- Mechanical arm + spinning platters
- Seek + rotation dominate latency
- Cheaper per GB · great for bulk data
- Disk scheduling matters a lot
Solid-State Drive (SSD)
- No moving parts · flash memory chips
- Near-uniform access · tiny seek cost
- Faster, quieter, more expensive / GB
- Wear leveling & FTL managed internally
Check Your Understanding