Physical Storage Media
Physical Storage Media is used for storing (writing /recording/saving) and retrieving (reading/opening) data.
A storage medium (media is the plural) is the physical material on which data is stored.
A storage device is the computer hardware that records and retrieves data to and from a storage medium.
Classification of Physical Storage Media is based upon the following characteristics :
- Speed of access
- Cost per unit of data
- Data loss on power failure or system crash
- Physical failure of the storage device
Can differentiate storage into :
Volatile Storage :
- Loses contents when power is switched off
- Non-volatile Storage :
- Contents persist even when power is switched off.
Types of Storage Media
- Main Memory
- Flash Memory
- Magnetic Disk
- Optical Disk
- Magnetic Tapes
- Most costly and fastest form of storage.
- Fast access, volatile.
- Very small in size.
- High speed memory
- Fast access (10s to 100s of nanoseconds)
- Too small or too expensive to store the entire database.
- Volatile memory - Contents of main memory are usually lost in a power failure or `crash'.
- Computer can Manipulate only data that is in main memory.
- Therefore, every program you execute and every file you access must be copied from a storage device into main memory
- Ex : RAM
- Non-volatile - Data survives power failure
- Reads are roughly as fast as main memory.
- But writes are slow (few microseconds), erase is slower
- Widely used in embedded devices such as digital cameras, USB flash drives, video games, etc..
2 Types :
- NAND Flash
- NOR Flash
Magnetic Disk Storage
- Data is stored on spinning disk, and read/written magnetically
- Primary medium for long-term storage.
- Typically the entire database can be stored on disk.
- Data must be moved from disk to main memory for access, and written back for storage.
- Disk storage is called direct access storage as it is possible to read data on the disk in any order.
- Disk storage usually survives power failures and system crashes (non-volatile).
- Ex : floppy disks, hard disks, etc.
- Non-volatile, data is read optically from a spinning disk using a laser
- CD-ROM (640 MB) and DVD (4.7 to 17 GB) most popular forms
- Blu-ray discs : 27 GB to 54 GB
- Write-one, read-many (WORM) optical discs used for archival storage (CD-R, DVD-R, DVD+R)
- Multiple write versions also available (CD-RW, DVD-RW, DVD+RW, and DVD-RAM)
- Reads and writes are slower than with magnetic disk
Non-volatile, used primarily for backup (to recover from disk failure), and for archival data
Sequential-access - much slower than disk
Very high capacity (40 to 300 GB tapes available)
Tape can be removed from drive ⇒ storage costs much cheaper than disk, but drives are expensive
Tape jukeboxes available for storing massive amounts of data
- hundreds of terabytes (1 terabyte = 10⁹ bytes) to even multiple petabytes (1 petabyte = 10¹2 bytes)
Primary storage : fastest media but volatile (cache, main memory).
Secondary storage : next level in hierarchy, non volatile, moderately fast access time
- E.G. Flash memory, magnetic disks
Tertiary storage : lowest level in hierarchy, non volatile, slow access time
- Also called off-line storage
Magnetic disks provide the bulk of secondary storage for modern computer systems.
The storage requirements of large applications have been growing very faster than the growth rate of disk capacities.
- Each disk platter has a flat, circular shape.
Its two surfaces are covered with a magnetic material, and information is recorded on the surfaces.
Read-write head :
Positioned very close to the platter surface (almost touching it)
Reads or writes magnetically encoded information.
- Surface of platter divided into circular tracks
- Over 50K-100K tracks per platter on typical hard disks
- Each track is divided into sectors.
- A sector is the smallest unit of data that can be read or written.
- Sector size - typically 512 bytes
- Typical sectors per track : 500 to 1000 (on inner tracks) to 1000 to 2000 (on outer tracks)
To read/write a sector :
Disk arm swings to position head on right track
Platter spins continually; data is read/written as sector passes under head.
Head-disk assemblies :
- Multiple disk platters on a single spindle (1 to 5 usually)
- One head per platter, mounted on a common arm.
- Cylinder i consists of ith track of all the platters
What is a cylinder?
Vertical section of track through all platters
Single movement of read/write head arms accesses all platters in cylinder
Disk Controller :
Interfaces between the computer system and the actual hardware of the disk drive.
It accepts commands to r/w a sector, and initiate actions.
Disk controllers also attach checksums to each sector to check read error.
Remapping of bad sectors : If a controller detects that a sector is damaged when the disk is initially formatted, or when an attempt is made to write the sector, it can logically map the sector to a different physical location.