Download Secondary Storage: Disk Operations and Management in Operating Systems and more Study notes Operating Systems in PDF only on Docsity! 1 Secondary Storage CSCI 444/544 Operating Systems Fall 2008 Agenda • Overview of secondary storage (disks) • Disk structure • Disk performance • Disk scheduling • Disk management • RAID (Redundant Arrays of Inexpensive Disks) Secondary Storage Secondary storage typically: • is anything that is outside of “primary memory” • does not permit direct execution of instructions or data retrieval via machine load/store instructions Characteristics: • it’s large: 200-1000GB • it’s cheap: $0.45/GB • it’s persistent: data survives power loss • it’s slow: milliseconds to access Disk capacity, 1975-1989 • doubled every 3+ years • 25% improvement each year • factor of 10 every decade • Still exponential, but far less rapid than processor performance Disk capacity since 1990 • doubling every 12 months • 100% improvement each year • factor of 1000 every decade • 10x as fast as the increase of processor performance! Disk trends 2 Memory Hierarchy Each level acts as a cache of lower levels CPU registers L1 cache L2 cache Primary Memory Secondary Storage Tertiary Storage <1KB 64KB 4MB 2GB 1000GB 1-1000TB 10 ms 1s-1hr <1ns 1 ns 4 ns 10 ns Disks and the OS Disks are messy, messy devices • errors, bad blocks, missed seeks, etc. Job of OS is to hide this mess from higher-level software • low-level device drivers (initiate a disk read, etc.) • higher-level abstractions (files, databases, etc.) OS may provide different levels of disk access to different clients • physical disk block (surface, cylinder, sector) • disk logical block (disk block #) • file logical (filename, block or record or byte #) Physical Disk Structure Disk Controller Responsible for interface between OS and disk drive • Common interfaces: ATA/IDE vs. SCSI – ATA/IDE used for personal storage – SCSI for enterprise-class storage Basic operations • Read block • Write block OS does not know of internal complexity of disk • Disk exports array of Logical Block Numbers (LBNs) • Disks map internal sectors to LBNs