Chapter 12: Mass-Storage Systems
Chapter 12: Mass-Storage Systems
Chapter 12: Mass-Storage Systems
Operating System Concepts – 7th Edition, Jan 1, 2005 12.2 Silberschatz, Galvin and Gagne ©2005
Objectives
Operating System Concepts – 7th Edition, Jan 1, 2005 12.3 Silberschatz, Galvin and Gagne ©2005
Overview of Mass Storage Structure
Magnetic disk and magnetic tape
Operating System Concepts – 7th Edition, Jan 1, 2005 12.4 Silberschatz, Galvin and Gagne ©2005
Moving-head Disk Machanism
Operating System Concepts – 7th Edition, Jan 1, 2005 12.5 Silberschatz, Galvin and Gagne ©2005
Overview of Mass Storage Structure (Cont.)
Magnetic tape
Slower than disk- 1000 times
Was early secondary-storage medium
Relatively permanent and holds large quantities of data
Access time slow
Random access ~1000 times slower than disk
Mainly used for backup, storage of infrequently-used data,
transfer medium between systems
Kept in spool and wound or rewound past read-write head
Once data under head, transfer rates comparable to disk
20-200GB typical storage
Common technologies are 4mm, 8mm, 19mm, LTO-2 and
SDLT
Operating System Concepts – 7th Edition, Jan 1, 2005 12.6 Silberschatz, Galvin and Gagne ©2005
Disk Structure
Operating System Concepts – 7th Edition, Jan 1, 2005 12.7 Silberschatz, Galvin and Gagne ©2005
Disk Attachment
Operating System Concepts – 7th Edition, Jan 1, 2005 12.8 Silberschatz, Galvin and Gagne ©2005
Network-Attached Storage
Operating System Concepts – 7th Edition, Jan 1, 2005 12.9 Silberschatz, Galvin and Gagne ©2005
Storage Area Network
Operating System Concepts – 7th Edition, Jan 1, 2005 12.10 Silberschatz, Galvin and Gagne ©2005
Disk Scheduling
Operating System Concepts – 7th Edition, Jan 1, 2005 12.11 Silberschatz, Galvin and Gagne ©2005
Disk Scheduling (Cont.)
Head pointer 53
Operating System Concepts – 7th Edition, Jan 1, 2005 12.12 Silberschatz, Galvin and Gagne ©2005
FCFS
Operating System Concepts – 7th Edition, Jan 1, 2005 12.13 Silberschatz, Galvin and Gagne ©2005
SSTF
Operating System Concepts – 7th Edition, Jan 1, 2005 12.14 Silberschatz, Galvin and Gagne ©2005
SSTF (Cont.)
Operating System Concepts – 7th Edition, Jan 1, 2005 12.15 Silberschatz, Galvin and Gagne ©2005
SCAN
Elevator algo
The disk arm starts at one end of the disk, and moves toward the
other end, servicing requests until it gets to the other end of the
disk, where the head movement is reversed and servicing
continues.
Sometimes called the elevator algorithm.
Illustration shows total head movement of 208 cylinders.
Operating System Concepts – 7th Edition, Jan 1, 2005 12.16 Silberschatz, Galvin and Gagne ©2005
SCAN (Cont.)
Operating System Concepts – 7th Edition, Jan 1, 2005 12.17 Silberschatz, Galvin and Gagne ©2005
C-SCAN
Operating System Concepts – 7th Edition, Jan 1, 2005 12.18 Silberschatz, Galvin and Gagne ©2005
C-SCAN (Cont.)
Operating System Concepts – 7th Edition, Jan 1, 2005 12.19 Silberschatz, Galvin and Gagne ©2005
C-LOOK
Version of C-SCAN
Arm only goes as far as the last request in each direction, then
reverses direction immediately, without first going all the way to the
end of the disk.
Operating System Concepts – 7th Edition, Jan 1, 2005 12.20 Silberschatz, Galvin and Gagne ©2005
C-LOOK (Cont.)
Operating System Concepts – 7th Edition, Jan 1, 2005 12.21 Silberschatz, Galvin and Gagne ©2005
Selecting a Disk-Scheduling Algorithm
Operating System Concepts – 7th Edition, Jan 1, 2005 12.22 Silberschatz, Galvin and Gagne ©2005
Disk Management
Operating System Concepts – 7th Edition, Jan 1, 2005 12.23 Silberschatz, Galvin and Gagne ©2005
Bad block
Operating System Concepts – 7th Edition, Jan 1, 2005 12.25 Silberschatz, Galvin and Gagne ©2005
Swap-Space Management
Operating System Concepts – 7th Edition, Jan 1, 2005 12.26 Silberschatz, Galvin and Gagne ©2005
Data Structures for Swapping on Linux
Systems
Operating System Concepts – 7th Edition, Jan 1, 2005 12.27 Silberschatz, Galvin and Gagne ©2005
RAID Structure
Operating System Concepts – 7th Edition, Jan 1, 2005 12.28 Silberschatz, Galvin and Gagne ©2005
RAID (cont)
Operating System Concepts – 7th Edition, Jan 1, 2005 12.29 Silberschatz, Galvin and Gagne ©2005
Level0- block level striping without
redundancy
1= disk mirroring
2 Memory style error correcting code
(ECC) organization. Each byte has a
parity bit 0 for even, 1 for odd parity
Stored parity
Operating System Concepts – 7th Edition, Jan 1, 2005 12.30 Silberschatz, Galvin and Gagne ©2005
3bit interleaved parity organization=
error correction and error detection.0
or 1 missing – correct
4= block interleaved parity
organization,
5= block interleaved distributed parity
Data +parity in every disk( do not
store data in one disk and parity in
other disk)
Operating System Concepts – 7th Edition, Jan 1, 2005 12.31 Silberschatz, Galvin and Gagne ©2005
Level 6P+Q redundancy scheme,
stores extra redundant information
against multiple disk faliure. Reed-
solomon codes
0+1- 0-provides performance
1+0
Operating System Concepts – 7th Edition, Jan 1, 2005 12.32 Silberschatz, Galvin and Gagne ©2005
RAID Levels
Operating System Concepts – 7th Edition, Jan 1, 2005 12.33 Silberschatz, Galvin and Gagne ©2005
RAID (0 + 1) and (1 + 0)
Operating System Concepts – 7th Edition, Jan 1, 2005 12.34 Silberschatz, Galvin and Gagne ©2005
Stable-Storage Implementation
Operating System Concepts – 7th Edition, Jan 1, 2005 12.35 Silberschatz, Galvin and Gagne ©2005
Tertiary Storage Devices
Operating System Concepts – 7th Edition, Jan 1, 2005 12.36 Silberschatz, Galvin and Gagne ©2005
Removable Disks
Floppy disk — thin flexible disk coated with magnetic material, enclosed
in a protective plastic case.
Operating System Concepts – 7th Edition, Jan 1, 2005 12.37 Silberschatz, Galvin and Gagne ©2005
Removable Disks (Cont.)
Operating System Concepts – 7th Edition, Jan 1, 2005 12.38 Silberschatz, Galvin and Gagne ©2005
WORM Disks
Operating System Concepts – 7th Edition, Jan 1, 2005 12.39 Silberschatz, Galvin and Gagne ©2005
Tapes
Operating System Concepts – 7th Edition, Jan 1, 2005 12.40 Silberschatz, Galvin and Gagne ©2005
Operating System Issues
Operating System Concepts – 7th Edition, Jan 1, 2005 12.41 Silberschatz, Galvin and Gagne ©2005
Application Interface
Most OSs handle removable disks almost exactly like fixed disks
— a new cartridge is formatted and an empty file system is
generated on the disk.
Tapes are presented as a raw storage medium, i.e., and
application does not not open a file on the tape, it opens the whole
tape drive as a raw device.
Usually the tape drive is reserved for the exclusive use of that
application.
Since the OS does not provide file system services, the application
must decide how to use the array of blocks.
Since every application makes up its own rules for how to organize
a tape, a tape full of data can generally only be used by the
program that created it.
Operating System Concepts – 7th Edition, Jan 1, 2005 12.42 Silberschatz, Galvin and Gagne ©2005
Tape Drives
The basic operations for a tape drive differ from those of a disk
drive.
locate positions the tape to a specific logical block, not an entire
track (corresponds to seek).
The read position operation returns the logical block number
where the tape head is.
The space operation enables relative motion.
Tape drives are “append-only” devices; updating a block in the
middle of the tape also effectively erases everything beyond that
block.
An EOT mark is placed after a block that is written.
Operating System Concepts – 7th Edition, Jan 1, 2005 12.43 Silberschatz, Galvin and Gagne ©2005
File Naming
Operating System Concepts – 7th Edition, Jan 1, 2005 12.44 Silberschatz, Galvin and Gagne ©2005
Hierarchical Storage Management (HSM)
Operating System Concepts – 7th Edition, Jan 1, 2005 12.45 Silberschatz, Galvin and Gagne ©2005
Speed
Operating System Concepts – 7th Edition, Jan 1, 2005 12.46 Silberschatz, Galvin and Gagne ©2005
Speed (Cont.)
Operating System Concepts – 7th Edition, Jan 1, 2005 12.47 Silberschatz, Galvin and Gagne ©2005
Reliability
Operating System Concepts – 7th Edition, Jan 1, 2005 12.48 Silberschatz, Galvin and Gagne ©2005
Cost
The cheapest tape drives and the cheapest disk drives have had
about the same storage capacity over the years.
Operating System Concepts – 7th Edition, Jan 1, 2005 12.49 Silberschatz, Galvin and Gagne ©2005
Price per Megabyte of DRAM, From 1981 to 2004
Operating System Concepts – 7th Edition, Jan 1, 2005 12.50 Silberschatz, Galvin and Gagne ©2005
Price per Megabyte of Magnetic Hard Disk, From 1981 to 2004
Operating System Concepts – 7th Edition, Jan 1, 2005 12.51 Silberschatz, Galvin and Gagne ©2005
Price per Megabyte of a Tape Drive, From 1984-2000
Operating System Concepts – 7th Edition, Jan 1, 2005 12.52 Silberschatz, Galvin and Gagne ©2005
End of Chapter 12