Disks Chapter 5 Thursday, April 5, 2007
Today’s Schedule Input/Output – Disks (Chapter 5.4) Magnetic vs. Optical Disks RAID levels and functions Disk Arm Scheduling Algorithms
Objectives You will be able to describe: Differences between magnetic and optical disks Benefits of RAID levels 0, 1, 2, & 3 Factors in time to read/write block to disk Relative benefits of disk arm scheduling algorithms
Disk Hardware Disk parameters for the original IBM PC floppy disk and a Western Digital WD hard disks
Movable-Head Magnetic Disk Storage
Optical vs. Magnetic sDisc Storage Optical disc vs. Magnetic disk: Magnetic disk Consists of concentric tracks of sectors Spins at a constant angular velocity (CAV) Wastes storage space but data retrieval is fast Optical disc Consists of a single spiralling track of same-sized sectors running from center to rim of disc Spins at a constant linear velocity (CLV) Allows more sectors and more data to fit on a disc
Disk Hardware (5) Recording structure of a CD or CD-ROM
Optical Disc Storage (continued) Figure 7.7: Magnetic diskFigure 7.8: Optical disc
Optical Disc Storage Important features of optical discs: Sustained data-transfer rate: Speed at which massive amounts of data can be read from disc Measured in bytes per second (Mbps) Crucial for applications requiring sequential access Average access time: Average time required to move head to a specific place on disc Expressed in milliseconds (ms) Cache size: Hardware cache acts as a buffer by transferring blocks of data from the disc
Disk Access Times Time required to access a file depends on: Seek time: Time to position read/write head Slowest of the three factors Doesn’t apply to devices with fixed read/write heads Search time (rotational delay): Time to rotate until desired record is under read/write head Transfer time: Time to transfer data from secondary storage to main memory Fastest
DASD Access Times Movable-Head Devices: Access time = Seek time + Search time + Transfer time Blocking is a good way to minimize access time
RAID- Redundant Array of Inexpensive Disks A set of physical disk drives that is viewed as a single logical unit Improves I/O performance Improves reliability through redundancy (data recovery in event of disk failure) BUT …. Increases hardware costs CPU performance improved with parallel processing, apply to I/O
RAID (continued) Figure 7.18: Data being transferred in parallel from a Level 0 RAID configuration to a large-capacity disk
RAID Mirroring redundancy to help recover from hardware failure Cost, speed, and the system’s applications are significant factors to consider when choosing a particular RAID level
RAID (continued) Table 7.7: The seven standard levels of RAID provide various degrees of error correction
Disk Hardware Raid levels 0 through 2 Backup and parity drives are shaded
Disk Hardware (4) Raid levels 3 through 5 Backup and parity drives are shaded
Disk Formatting A disk sector Low-Level format on each platter Preamble – bit pattern h/w detection of sector start Data – Ex 512 bytes ECC – Info to recover from read errors Partition Disk – Logically separate disks 0 has Master Boot Record High-Level format of each Partition to support O/S and file system
Disk Formatting Interleaving gives Controller “breathing space” between consecutive sectors to copy buffer to memory a) No interleaving b) Single interleaving c) Double interleaving
Disk Arm Scheduling Algorithms Time required to read or write a disk block determined by 3 factors 1. Seek time 2. Rotational delay 3. Actual transfer time Seek time dominates Use other than FCFS scheme Error checking is done by controllers Goal: Minimal response time and fairness
Disk Arm Scheduling Algorithms Shortest Seek First (SSF) Service closest Request next Ex. Seek Requests:11, 1, 36, 16, 34, 9, 12 FCFS = 111 arm moves vs SSF has 61 Initial position Pending requests Favors the middle cylinders
Disk Arm Scheduling Algorithms The elevator algorithm Keep moving in same direction until no more outstanding requests
Summary Differences between magnetic and optical disks Benefits of RAID levels 0, 1, 2, & 3 Factors in time to read/write block to disk Relative benefits of disk arm scheduling algorithms
Let’s Try some for extra points … Chapter 5 Problems, Pg 373 – 376 Problems #2, 9, 10, 13, 16, 18, 22, 24
Tuesday, April 10 Read Chapter 6 File Systems 6.1 Files 6.2 Directories