CSE 451: Operating Systems Winter 2012 Secondary Storage Mark Zbikowski Gary Kimura.

Slides:



Advertisements
Similar presentations
Disk Storage SystemsCSCE430/830 Disk Storage Systems CSCE430/830 Computer Architecture Lecturer: Prof. Hong Jiang Courtesy of Yifeng Zhu (U. Maine) Fall,
Advertisements

CS 6560: Operating Systems Design
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Disks and RAID.
Disk Drivers May 10, 2000 Instructor: Gary Kimura.
Based on the slides supporting the text
Disks.
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
Avishai Wool lecture Introduction to Systems Programming Lecture 9 Input-Output Devices.
Secondary Storage CSCI 444/544 Operating Systems Fall 2008.
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.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 12: Mass-Storage Systems.
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
Device Management. So far… We have covered CPU and memory management Computing is not interesting without I/Os Device management: the OS component that.
CS 153 Design of Operating Systems Spring 2015 Lecture 20: File Systems.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 10: Mass-Storage Systems.
Topic: Disks – file system devices. Rotational Media Sector Track Cylinder Head Platter Arm Access time = seek time + rotational delay + transfer time.
IT 344: Operating Systems Winter 2010 Module 13 Secondary Storage Chia-Chi Teng CTB 265.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 12: Mass-Storage Systems.
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 111 Chapter 11: Hardware (Slides by Hector Garcia-Molina,
Disks and Storage Systems
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  Applied Operating System Concepts Ref: Chap 12 Secondary Storage and I/O Systems.
UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department
OPERATING SYSTEMS IO SYSTEMS. Categories of I/O Devices Human readable –Used to communicate with the user –Printers –Video display terminals Display Keyboard.
CSE 451: Operating Systems Winter 2015 Module 14 Secondary Storage Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska, Levy,
1.  Disk Structure Disk Structure  Disk Scheduling Disk Scheduling  FCFS FCFS  SSTF SSTF  SCAN SCAN  C-SCAN C-SCAN  C-LOOK C-LOOK  Selecting a.
Operating Systems (CS 340 D) Princess Nora University Faculty of Computer & Information Systems Computer science Department.
Device Management Mark Stanovich Operating Systems COP 4610.
Chapter 9 I/O System. 2 Input/Output System I/O Major objectives are: Take an application I/O request and send it to the physical device. Then, take whatever.
Disk Scheduling The operating system is responsible for using hardware efficiently — for the disk drives, this means having a fast access time and disk.
Device Management Andy Wang Operating Systems COP 4610 / CGS 5765.
CSE 451: Operating Systems Spring 2006 Module 14 From Physical to Logical: File Systems John Zahorjan Allen Center 534.
CSE 451: Operating Systems Spring 2010 Module 12.5 Secondary Storage John Zahorjan Allen Center 534.
Chapter 10: Mass-Storage Systems
Sarah Diesburg Operating Systems CS 3430
Disks and RAID.
Secondary Storage Secondary storage typically: Characteristics:
CS703 - Advanced Operating Systems
Disk Scheduling Algorithms
IT 344: Operating Systems Winter 2008 Module 13 Secondary Storage
CSE 153 Design of Operating Systems Winter 2018
Input-output I/O is very much architecture/system dependent
CSE 451: Operating Systems Winter 2006 Module 13 Secondary Storage
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
Persistence: hard disk drive
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
CSE 451: Operating Systems Spring 2006 Module 14 From Physical to Logical: File Systems John Zahorjan Allen Center
Lecture 10: Magnetic Disks
Operating Systems 2019 Spring by Euiseong Seo
CSE 451: Operating Systems Spring 2007 Module 11 Secondary Storage
Andy Wang Operating Systems COP 4610 / CGS 5765
CS 245: Database System Principles Notes 02: Hardware
Presentation transcript:

CSE 451: Operating Systems Winter 2012 Secondary Storage Mark Zbikowski Gary Kimura

3/7/20162 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 (or more!) –it’s cheap: $0.25/GB … er… $0.10/Gb –it’s persistent: data survives power loss –it’s slow: milliseconds to access why is this slow? –it does fail, if rarely Big failures (disk dies) Little failures (read/write errors, one byte in 10^13)

3/7/20163 Another trip down memory lane … IBM 2314 About the size of 6 refrigerators 8 x 29MB (M!) Required similar sized air conditioning

3/7/20164 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 –Capacity growth10x as fast as processor performance! Speed has NOT grown similarly Disk trends

3/7/20165 Only a few years ago, we purchased disks by the megabyte (and it hurt!) Today, 1 GB (a billion bytes) costs $1 $0.50 $0.25 $0.10 from Dell (except you have to buy in increments of GB) –=> 1 TB costs $1K $500 $250 $100, 1 PB costs $1M $500K $250K $10000 Technology is amazing –Flying 747 six inches above the ground at 600mph –Reading/writing a strip of postage stamps –5-20 molecules of gas separating platter from head But… –Jet bumps down –Bits are so close that cosmic rays/quantum effects change them

3/7/20166 Memory hierarchy Each level acts as a cache of lower levels CPU registers L1 cache L2 cache Primary Memory Secondary Storage Tertiary Storage 100 bytes 32KB 256KB 1GB 100GB TB 10+ ms 1s-1hr ~.1 ns 1 ns 4 ns 60 ns

3/7/20167 Memory hierarchy: distance analogy CPU registers L1 cache L2 cache Primary Memory Secondary Storage Tertiary Storage 12 seconds 1 minutes 15 minutes 4.75 years 500 years“This planet” “My head” “This room” “This building” “This city” 1 second “My desk”

3/7/20168 Big Picture OS provides abstractions to allow physical HW resources to be shared / protected –CPU sharing with threads (virtual CPU) –Memory sharing with virtual memory –Disk sharing with files

3/7/20169 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 (head, cylinder, sector) –disk logical block (disk block #) –file logical (filename, block or record or byte #)

3/7/ Physical disk structure Disk components –platters –surfaces –tracks –sectors –cylinders –arm –heads platter surface track sector cylinder arm head

3/7/ Disk performance Performance depends on a number of steps –seek: moving the disk arm to the correct cylinder depends on how fast disk arm can move –seek times aren’t diminishing very quickly (why?) –rotation (latency): waiting for the sector to rotate under head depends on rotation rate of disk –rates are increasing, but slowly (why?) –transfer: transferring data from surface into disk controller, and from there sending it back to host depends on density of bytes on disk –increasing, relatively quickly When the OS uses the disk, it tries to minimize the cost of all of these steps –particularly seeks and rotation

3/7/ Performance via disk layout OS may increase file block size in order to reduce seeking OS may seek to co-locate “related” items in order to reduce seeking –blocks of the same file –data and metadata for a file

3/7/ Performance via caching, pre-fetching Keep data or metadata in memory to reduce physical disk access –problem? If file access is sequential, fetch blocks into memory before requested

3/7/ Performance via disk scheduling Seeks are very expensive, so the OS attempts to schedule disk requests that are queued waiting for the disk –FCFS (do nothing) reasonable when load is low long waiting time for long request queues –SSTF (shortest seek time first) minimize arm movement (seek time), maximize request rate unfairly favors middle blocks –SCAN (elevator algorithm) service requests in one direction until done, then reverse skews wait times non-uniformly (why?) –C-SCAN like scan, but only go in one direction (typewriter) uniform wait times

3/7/ Interacting with disks In the old days… –OS would have to specify cylinder #, sector #, surface #, transfer size i.e., OS needs to know all of the disk parameters Modern disks are even more complicated –not all sectors are the same size, sectors are remapped, … –disk provides a higher-level interface, e.g., SCSI exports data as a logical array of blocks [0 … N] maps logical blocks to cylinder/surface/sector OS only needs to name logical block #, disk maps this to cylinder/surface/sector on-board cache as a result, physical parameters are hidden from OS –both good and bad

3/7/ Example disk characteristics Lecture Year DeviceIBM Ultrastar 36XP driveSeagate Constellation ES Form Factor3.5” Capacity36Gb2Tb Rotation7200 Platters106 Surfaces2012 Sector Sizes Cylinders11,494123,418 Cache4Mb16Mb Transfer Rates17.9 MB/s (inner) 28.9 MB/s (outer) 75 MB/s (inner) 142 MB/s (outer) Full Seek14.5ms17.5ms Head Switch0.3ms