Secondary Storage CSCI 444/544 Operating Systems Fall 2008.

Slides:



Advertisements
Similar presentations
I/O Management and Disk Scheduling
Advertisements

CS 6560: Operating Systems Design
Disk Scheduling Based on the slides supporting the text 1.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Disks and RAID.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 12: Mass-Storage Systems.
Disk Drivers May 10, 2000 Instructor: Gary Kimura.
Based on the slides supporting the text
Disks.
1 Disk Scheduling Chapter 14 Based on the slides supporting the text.
12: IO Systems1 I/O SYSTEMS This Chapter is About Processor I/O Interfaces: Connections exist between processors, memory, and IO devices. The OS must manage.
1 File System Implementations. 2 Overview The Low Level –disks –caching –RAM disks –RAIDs –disk head scheduling The higher level –file systems –directories.
Disks CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Mass-Storage Systems Revised Tao Yang.
Secondary Storage Management Hank Levy. 8/7/20152 Secondary Storage • Secondary Storage is usually: –anything outside of “primary memory” –storage that.
Introduction to Database Systems 1 The Storage Hierarchy and Magnetic Disks Storage Technology: Topic 1.
12.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 12: Mass-Storage Systems.
Disk and I/O Management
Mass storage Structure Unit 5 (Chapter 14). Disk Structures Magnetic disks are faster than tapes. Disk drives are addressed as large one- dimensional.
1 Operating Systems Part VI: Mass- Storage Structure.
Disk Access. DISK STRUCTURE Sector: Smallest unit of data transfer from/to disk; 512B 2/4/8 adjacent sectors transferred together: Blocks Read/write heads.
Topic: Disks – file system devices. Rotational Media Sector Track Cylinder Head Platter Arm Access time = seek time + rotational delay + transfer time.
1 Lecture 8: Secondary-Storage Structure 2 Disk Architecture Cylinder Track SectorDisk head rpm.
IT 344: Operating Systems Winter 2010 Module 13 Secondary Storage Chia-Chi Teng CTB 265.
Disk Structure Disk drives are addressed as large one- dimensional arrays of logical blocks, where the logical block is the smallest unit of transfer.
Chapter 12: Mass-Storage Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 12: Mass-Storage Systems Overview of Mass.
Disks. Secondary Storage Secondary Storage Typically – Storage systems outside of “primary memory” – Cannot access data using load/store instructions.
Page 110/12/2015 CSE 30341: Operating Systems Principles Network-Attached Storage  Network-attached storage (NAS) is storage made available over a network.
Disks and Storage Systems
1Fall 2008, Chapter 12 Disk Hardware Arm can move in and out Read / write head can access a ring of data as the disk rotates Disk consists of one or more.
CS 6502 Operating Systems Dr. J.. Garrido Device Management (Lecture 7b) CS5002 Operating Systems Dr. Jose M. Garrido.
CE Operating Systems Lecture 20 Disk I/O. Overview of lecture In this lecture we will look at: Disk Structure Disk Scheduling Disk Management Swap-Space.
I/O Management and Disk Structure Introduction to Operating Systems: Module 14.
Disks Chapter 5 Thursday, April 5, Today’s Schedule Input/Output – Disks (Chapter 5.4)  Magnetic vs. Optical Disks  RAID levels and functions.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 14: Mass-Storage Systems Disk Structure Disk Scheduling Disk Management Swap-Space.
UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department
CSE 451: Operating Systems Winter 2015 Module 14 Secondary Storage Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska, Levy,
Chapter 14: Mass-Storage
Chapter 14: Mass-Storage Systems Disk Structure. Disk Scheduling. RAID.
CSE 451: Operating Systems Winter 2012 Secondary Storage Mark Zbikowski Gary Kimura.
Part IV I/O System Chapter 12: Mass Storage Structure.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 10: Mass-Storage Systems.
CSE 451: Operating Systems Spring 2010 Module 12.5 Secondary Storage John Zahorjan Allen Center 534.
Operating System (013022) Dr. H. Iwidat
Disks and RAID.
I/O System Chapter 5 Designed by .VAS.
Chapter 12: Mass-Storage Structure
Secondary Storage Secondary storage typically: Characteristics:
Operating System I/O System Monday, August 11, 2008.
Mass-Storage Structure
DISK SCHEDULING FCFS SSTF SCAN/ELEVATOR C-SCAN C-LOOK.
IT 344: Operating Systems Winter 2008 Module 13 Secondary Storage
Chapter 12: Mass-Storage Systems
CSE 451: Operating Systems Winter 2006 Module 13 Secondary Storage
Overview Continuation from Monday (File system implementation)
CSE 451: Operating Systems Autumn 2009 Module 13 Secondary Storage
CSE 451: Operating Systems Autumn 2003 Lecture 12 Secondary Storage
CSE 451: Operating Systems Winter 2007 Module 13 Secondary Storage
CSE 451: Operating Systems Spring 2006 Module 13 Secondary Storage
Secondary Storage Management Brian Bershad
CSE 451: Operating Systems Secondary Storage
CSE 451: Operating Systems Winter 2003 Lecture 12 Secondary Storage
Disks and Storage Systems
CSE 451: Operating Systems Winter 2009 Module 12 Secondary Storage
CSE 451: Operating Systems Spring 2005 Module 13 Secondary Storage
Secondary Storage Management Hank Levy
CSE451 File System Introduction and Disk Drivers Autumn 2002
CSE 451: Operating Systems Autumn 2004 Secondary Storage
CSE 451: Operating Systems Winter 2004 Module 13 Secondary Storage
Lecture 10: Magnetic Disks
CSE 451: Operating Systems Spring 2007 Module 11 Secondary Storage
Presentation transcript:

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: GB it’s cheap: $0.45/GB it’s persistent: data survives power loss it’s slow: milliseconds to access

Disk capacity, 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

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 TB 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

Disk Operations Disk performance depends on a number of operations seek: moving the disk arm (head) to the correct cylinder –depends on how fast disk arm can move rotation (latency): waiting for the sector to rotate under head –depends on rotation rate of disk transfer: sequentially moving data from surface into disk controller, and from there sending it back to host –depends on density of bytes on disk When the OS uses the disk, it tries to minimize the cost of all of these operations particularly seeks and rotation

Disk Performance Positioning (head): Seek + Rotation Positioning time: Seek time + Rotational Delay How long to read or write n sectors? Positioning time + Transfer time (n) Implicit contract: Large sequential accesses to contiguous LBNs achieve much better performance than small transfers or random accesses

Disk Scheduling Goal: Minimize positioning time FCFS: Schedule requests in order received Advantage: Fair Disadvantage: High seek cost and rotation Shortest seek time first (SSTF): Handle nearest cylinder next Advantage: Reduces arm movement (seek time) Disadvantage: Unfair, can starve some requests

FCFS

SSTF

Disk Scheduling (II) SCAN (elevator algorithm) –move arm from one end toward the other end –service requests until reach the other end, then reverse –skews wait times non-uniformly C-SCAN (Circular-Scan) –Like scan, but only go in one direction, then start over again (typewriter) –uniform wait times LOOK and C-LOOK –similar to SCAN and C-SCAN, except stop at the last request –look for a request before continue to move in a give direction

SCAN

C-SCAN

C-LOOK

Disk Management Low-level formatting, or physical formatting — Dividing a disk into sectors that the disk controller can read and write. To use a disk to hold files, the operating system still needs to record its own data structures on the disk. Partition the disk into one or more groups of cylinders. Logical formatting or “making a file system”. Boot block initializes system. Bootstrap loader program in ROM. the full bootstrap program is stored in the “boot block” at the fixed location on the disk.

Reliability Disks fail more often.... When continuously powered-on With heavy workloads Under high temperatures How do disks fail? Whole disk can stop working (e.g., motor dies) Transient problem (cable disconnected) Individual sectors can fail (e.g., head crash or scratch) –Data can be corrupted or block not readable/writable Disks can internally fix some sector problems ECC (error correction code): Detect/correct bit flips Retry sector reads and writes: Try different offset and timing combinations for heads Remap sectors: Do not use bad sectors in future

RAID RAID: multiple disk drives provide reliability via redundancy Performance: parallel access Capacity: store more data Disk striping uses a group of disks as one storage unit. RAID schemes improve performance and improve the reliability of the storage system by storing redundant data. Mirroring or shadowing keeps duplicate of each disk. Block interleaved parity uses much less redundancy. RAID turns multiple disks into one bigger, faster, more reliable disk