1 / 20

W4118 Operating Systems

W4118 Operating Systems. Instructor: Junfeng Yang. Disk. Goal Learn how disks work This knowledge will help us better understand tradeoffs in file systems Disk Structure Disk Interface Disk Overhead Disk Technology Trends Redundant Arrays of Inexpensive Disks (RAID).

margery
Download Presentation

W4118 Operating Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. W4118 Operating Systems Instructor: Junfeng Yang

  2. Disk • Goal • Learn how disks work • This knowledge will help us better understand tradeoffs in file systems • Disk Structure • Disk Interface • Disk Overhead • Disk Technology Trends • Redundant Arrays of Inexpensive Disks (RAID)

  3. Moving-head Disk Structure

  4. Disk Interface • Disk drives addressed as one-dimension of logical sectors • The logical sector is the smallest unit of transfer • This array is mapped sequentially onto disk sectors • Logical sector 0 is the 1st sector of 1st track of the outermost cylinder • Logical sector address incremented within track, then within tracks of cylinder, then across cylinders, from outermost to innermost • Precisely reverse-engineer this mapping in OS is difficult • Disk transparently remap defective sectors • Number of sectors per track is not a constant

  5. Disk Overheads • To read from disk, disk controller computes cylinder #, surface #, sector # • Latency includes: • Seek time: to get to the track • Latency time: to get to the sector (rotation delay) • Transfer time: get bits off the disk Track Sector Rotation Delay Seek Time

  6. Sequential v.s. Random • Overhead of sequential access • Seek to the right track • Rotate to the right sector • Transfer • Overhead of random access of the same amount of data • Seek to the right track • Rotate to the right sector • Transfer • Repeat • Since seek and rotate are slow, sequential access is much faster than random access

  7. Modern Disk Parameters

  8. Disk Technology Trends • Data  More dense • More bits per square inch • Disk head closer to surface • Create smaller disk with same capacity • Disk geometry  smaller • Spin faster  Increase bandwidth, reduce rotational delay • Faster seek • Lighter weight • Disk price  cheaper • Density improving more than speed (mechanical limitations)

  9. RAID Motivation • Performance • disks are slow compared to CPU • Disk speed improves slowly compared to CPU • Reliability • In single disk systems, one disk failure  data loss • Cost • A single fast, reliable disk is expensive

  10. RAID Idea • RAID idea: use redundancy to improve performance and reliability • Redundant array of cheap disks as one storage unit • Fast: simultaneous read and write disks in the array • Reliable: use parity to detect and correct errors • RAID can have different redundancy levels, achieving different performance and reliability • Seven different RAID levels (0-6)

  11. Evaluating RAID • Performance • Large Read • Large Write • Large Read-Modify-Write • Small Read • Small Write • Small Read-Modify-Write • Reliability • Tolerance of disk failures • Cost • Storage utilization: data capacity / total capacity

  12. RAID 0: Non-redundant Striping • Structure • Data striped across all disks in an array • No parity • Advantages: • Good performance: with N disks, speed up N times • Disadvantages: • Poor reliability: one disk failure  data loss

  13. RAID 1: Mirroring • Structure • Keep a mirrored (shadow) copy of data • Advantages • Good reliability: one disk failure OK • Good read performance • Disadvantage • High cost: one data disk requires one parity disk

  14. RAID2: Error-Correction Parity parity disks • Structure • A data sector striped across data disks • Compute error-correcting parity and store in parity disks • Advantages • Good reliability with higher storage utilization than mirroring • Disadvantages • Cost still high • Poor small read, write, read-modify-write performance • E.g., to read a data sector, must read a sector from each disk

  15. RAID3: Bit-Interleaved Parity • Structure • Each data sector striped across data disks • One parity disk (XOR of each stripe of a data sector) • Advantages • Same reliability with one disk failure as RAID2 since disk controller can determine what disk fails • High storage utilization • Disadvantages • Poor small read, write, read-modify-write performance

  16. RAID4: Block-Interleaved Parity P • Structure • A set of data sectors (parity group) striped across data disks • One parity disk (XOR of data sectors) • Advantages • Same reliability as RAID3 since disk controller can detect if sector is correct • Good small read performance • Disadvantages • Poor small write and read-modify-write performance • All writes must write parity  parity disk is bottleneck

  17. RAID5: Block-Interleaved Distributed Parity P P P P • Structure • Same as RAID4 except no single parity disk • Parity sectors distributed across all disks • Advantages • Good performance • Good Small write and read-modify-write performance • Disadvantages • Only tolerate one disk failure

  18. RAID6: P+Q Redundancy P Q Q P P Q P Q • Structure • Same as RAID 5 except using two parity sectors per parity group • Advantages • Can tolerate two disk failures

  19. RAID Levels

  20. New Mass Storage Technologies • Disk speed limited by mechanical parts • Seek and rotational delays • New memory-based mass storage technologies solve this problem • NAND Flash • Battery-backed DRAM (NVRAM) • Disadvantages • Price: still more expensive than same capacity disk • Reliability: more likely to lose data

More Related