Disks and Storage Systems

Slides:



Advertisements
Similar presentations
13. Secondary Storage (S&G, Ch. 13)
Advertisements

Operating Systems ECE344 Ashvin Goel ECE University of Toronto Disks and RAID.
CSE506: Operating Systems Disk Scheduling. CSE506: Operating Systems Key to Disk Performance Don’t access the disk – Whenever possible Cache contents.
OPERATING SYSTEMS CS3530 Summer 2014 OPERATING SYSTEMS CS3530 Summer 2014 Input/Output System Chapter 9.
Disk Drivers May 10, 2000 Instructor: Gary Kimura.
CS 104 Introduction to Computer Science and Graphics Problems Operating Systems (4) File Management & Input/Out Systems 10/14/2008 Yang Song (Prepared.
Slide 5-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 5.
Disks.
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.
Secondary Storage CSCI 444/544 Operating Systems Fall 2008.
1 Today I/O Systems Storage. 2 I/O Devices Many different kinds of I/O devices Software that controls them: device drivers.
Secondary Storage Management Hank Levy. 8/7/20152 Secondary Storage • Secondary Storage is usually: –anything outside of “primary memory” –storage that.
Operating Systems COMP 4850/CISG 5550 Disks, Part II Dr. James Money.
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
CS 346 – Chapter 10 Mass storage –Advantages? –Disk features –Disk scheduling –Disk formatting –Managing swap space –RAID.
1 6 Further System Fundamentals (HL) 6.2 Magnetic Disk Storage.
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.
1 Lecture 8: Secondary-Storage Structure 2 Disk Architecture Cylinder Track SectorDisk head rpm.
Operating Systems CMPSC 473 I/O Management (4) December 09, Lecture 25 Instructor: Bhuvan Urgaonkar.
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Caccamo1 Disk & disk scheduling.
CS 153 Design of Operating Systems Spring 2015 Final Review.
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.
File System Implementation Chapter 12. File system Organization Application programs Application programs Logical file system Logical file system manages.
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.
Disks Chapter 5 Thursday, April 5, Today’s Schedule Input/Output – Disks (Chapter 5.4)  Magnetic vs. Optical Disks  RAID levels and functions.
15-410, S’ Disks Mar. 24, 2004 Dave Eckhardt & Bruce Maggs Brian Railing & Steve Muckle Contributions from Eno Thereska “How Stuff Works”
Lecture 3 Page 1 CS 111 Online Disk Drives An especially important and complex form of I/O device Still the primary method of providing stable storage.
UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department
12/18/20151 Operating Systems Design (CS 423) Elsa L Gunter 2112 SC, UIUC Based on slides by Roy Campbell, Sam.
Operating Systems (CS 340 D) Princess Nora University Faculty of Computer & Information Systems Computer science Department.
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.
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 13 Mass-Storage Systems Slide 1 Chapter 13 Mass-Storage Systems.
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.
CSE 451: Operating Systems Winter 2012 Secondary Storage Mark Zbikowski Gary Kimura.
Lecture Topics: 11/22 HW 7 File systems –block allocation Unix and NT –disk scheduling –file caches –RAID.
CSE 451: Operating Systems Spring 2010 Module 12.5 Secondary Storage John Zahorjan Allen Center 534.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems DISK I/0.
FileSystems.
Disks and RAID.
Operating Systems Disk Scheduling A. Frank - P. Weisberg.
Secondary Storage Secondary storage typically: Characteristics:
CS703 - Advanced Operating Systems
Disk Scheduling Algorithms
IT 344: Operating Systems Winter 2008 Module 13 Secondary Storage
Lecture 45 Syed Mansoor Sarwar
CSE 451: Operating Systems Winter 2006 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 2007 Module 11 Secondary Storage
Presentation transcript:

Disks and Storage Systems CSE451 Andrew Whitaker How is the disk abstraction different than memory?

Big Picture OS provides abstractions to allow physical HW resources to be shared CPU sharing with threads Memory sharing with virtual memory Disk sharing with files

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

Disk Interface (as seen from the OS) Disk exposes a contiguous array of logical block numbers Internally, the disk maps these to cylinder, head, sector

Disk Size and Cost Cost per gigabyte has plummeted Now approximately $ .33 per Gigabyte

Disk trends Disk capacity, 1975-1989 Disk capacity since 1990 doubled every 3+ years 25% improvement each year factor of 10 every decade 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 an improvement as processor performance!

Components of Disk Access Latency Seek time: moving the disk arm to the correct cylinder Rotation time: waiting for the sector to rotate under head Depends on rotation rate of disk Transfer time: transferring data from surface into disk controller, and from there into main memory Of these, only transfer time is getting better

Implications of Disk Performance Large transfers are faster (per byte) than small transfers Contiguous transfers are faster than scattered transfers Contiguous transfer rate is 500X random access rate

Disk Partitions Each physical disk can be split into logical disks, called partitions Partition 1 Partition 2 Partition 3 Partition table provides sizes, types Located in the first disk sector Master Boot Record

Disks and File Systems Each partition can contain a file system Examples: NTFS, ext3, FFS UNIX mount command shows file system  partition mapping /dev/sda2 on / type ext3 (rw) /dev/sda5 on /usr type ext3 (rw,nodev) /dev/sda6 on /var type ext3 (rw,nosuid,nodev) /dev/sda7 on /tmp type ext3 (rw,nosuid,nodev) proc on /proc type proc (rw)

Accessing the Disk Disk access is provided by a block device driver Provides a function to enqueue a request Privileged User Apps File Systems Enqueue request Device Driver Read/write sectors Disk

What Happens on Enqueue Request? OS maps from <partition, offset> to a logical block number Make sure the offset is in bounds! The request is added to a pending request queue Common optimization: clustering If the request is adjacent (on disk) to another request, merge them Request scheduling OS chooses an order for pending requests (see next slides) Once the device is free, the device driver dispatches one or more pending requests

Disk Scheduling Problem: Given a set of pending disk requests, choose an ordering Goals (Quite possibly conflicting) Maximize throughput Minimize waiting Provide fairness Avoid starvation

Policy #1: First-come, First-serve Disk requests are dispatched in the order they arrive Performance of FCFS is highly dependent on the workload Performs well if disk requests arrive in contiguous order Performs poorly if requests arrivals are scattered across disk

Policy #2: Shortest-seek-time-first Schedule the request that is closest to the current head position Advantage: much better performance than FCFS Disadvantage: bias, starvation Requests in the middle cylinders get better service Requests in outer cylinders can starve

Policy #3: SCAN Scheduling Head continuously moves back and forth across the disk Sometimes called “elevator algorithm” Advantages: starvation-free, reasonable performance, easy to implement (sort)

Looking Ahead: File Systems One proposal: use disk partitions for files Use one disk partition per file Is this a good idea? Why or why not? foo.txt bar.txt zag.txt