Storage Architecture
Storage keeps programs and data when the computer is switched off. Unlike RAM, storage is normally non-volatile. The operating system and applications use storage to save files and retrieve them later.
Main storage types
Hard disk drive (HDD)
An HDD stores data magnetically on spinning disks. A read/write head moves to access data.
Usually offers lots of capacity for the price.
Has moving parts, so it is generally slower and more vulnerable to physical shock than an SSD.
Solid-state drive (SSD)
An SSD stores data in flash memory and has no moving parts.
Usually provides faster access than an HDD.
Is more resistant to shock.
Has a limited number of write cycles, though normal drive management helps extend its useful life.
Removable and network storage
USB drives and memory cards are portable flash storage.
Optical discs use lasers to read or write data.
Network storage lets computers access data held on another system, such as a file server or network-attached storage device.
How the OS organises storage
The operating system and file system work together to make stored data easier to use:
A file is a named collection of data.
A directory organises files and other directories.
A path identifies where a file or directory is located.
Metadata describes a file, such as its size, owner, timestamps and permissions.
The file system maps a file’s logical name and location to the structures and blocks used on the storage device.
Reading and writing a file
When an application saves a file, it requests the operation from the OS. The OS checks access permissions, uses the file system to organise the data, and sends the storage device appropriate commands through a driver. Reading a file follows a similar process in reverse.
The device controller manages communication with the physical device. When an operation completes, the device may notify the OS, for example by raising an interrupt.
Storage performance
Storage performance can depend on:
Capacity: how much data it can hold.
Throughput: how much data it can transfer over time.
Latency: how long it takes to begin responding to a request.
Access pattern: reading or writing one continuous region may behave differently from accessing many scattered regions.
An SSD usually has lower access latency than an HDD because it does not need to move a mechanical head into position.
Reliability and security
Backups help recover data after deletion, damage or device failure.
Redundancy can help keep services available if a storage device fails, but it is not a substitute for backups.
Permissions restrict which users and processes may access files.
Encryption can help protect stored data if a device is lost or stolen.
Secure deletion is more complicated on some SSDs because the device manages where data is physically written.
Storage versus memory
RAM | Storage |
|---|---|
Holds data currently in use | Keeps files and programs long term |
Usually volatile | Usually non-volatile |
Faster to access | Usually slower than RAM |
Smaller capacity | Usually larger capacity |
Key terms to remember
HDD · SSD · flash memory · file system · file · directory · path · metadata · device controller · latency · throughput · backup
Check your understanding
What is the main difference between RAM and storage?
How does an HDD differ from an SSD?
What is file-system metadata?
What role does a device controller play?
Why is redundancy not the same as a backup?
Answers:
RAM is temporary working memory; storage keeps data when power is off.
An HDD uses spinning magnetic disks and a moving head; an SSD uses flash memory without moving parts.
Information about a file, such as its size, owner, timestamps or permissions.
It manages communication with the storage device.
Redundancy can help a system continue operating after a failure, but it may also copy accidental deletion or corruption; a separate backup supports recovery.