Chapter 14: Mass-Storage Systems Disk Structure. Disk Scheduling. RAID.

Slides:



Advertisements
Similar presentations
Silberschatz, Galvin and Gagne Operating System Concepts Disk Scheduling Disk IO requests are for blocks, by number Block requests come in an.
Advertisements

I/O Management and Disk Scheduling
Operating Systems Disk Scheduling A. Frank - P. Weisberg.
RAID (Redundant Arrays of Independent Disks). Disk organization technique that manages a large number of disks, providing a view of a single disk of High.
CS 6560: Operating Systems Design
Disk Scheduling Based on the slides supporting the text 1.
Operating Systems 1 K. Salah Module 5.0: I/O and Disks I/O hardware Polling and Interrupt-driven I/O DMA Bock and character devices Blocking and nonblocking.
1 File Systems Chapter Files 6.2 Directories 6.3 File system implementation 6.4 Example file systems.
Chapter 12: Mass-Storage Structures
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 12: Mass-Storage Systems.
File System Implementation
Mass-Storage Structure
Based on the slides supporting the text
Disks.
1 Disk Scheduling Chapter 14 Based on the slides supporting the text.
Disks CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
Secondary Storage CSCI 444/544 Operating Systems Fall 2008.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Mass-Storage Systems Revised Tao Yang.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 12: Mass-Storage Systems.
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
1 File System Implementation Operating Systems Hebrew University Spring 2010.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 14: Mass-Storage Systems Disk Structure Disk Scheduling Disk Management Swap-Space.
Mass storage Structure Unit 5 (Chapter 14). Disk Structures Magnetic disks are faster than tapes. Disk drives are addressed as large one- dimensional.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 10: Mass-Storage Systems.
1 Lecture 8: Secondary-Storage Structure 2 Disk Architecture Cylinder Track SectorDisk head rpm.
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.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 13+14: I/O Systems and Mass- Storage Structure I/O Hardware Application I/O.
Chapter 12: Mass-Storage Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 12: Mass-Storage Systems Overview of Mass.
Page 110/12/2015 CSE 30341: Operating Systems Principles Network-Attached Storage  Network-attached storage (NAS) is storage made available over a network.
Chapter 12: Mass-Storage Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 Chapter 12: Mass-Storage.
© 2009 EMC Corporation. All rights reserved. Intelligent Storage Systems Module 1.4.
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.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 14: Mass-Storage Systems Disk Structure Disk Scheduling Disk Management Swap-Space.
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.
Chapter 14: Mass-Storage
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.
1 Chapter 13 Mass-Storage Structure. 2 Disk Structure Disk drives are addressed as large 1- dimensional arrays of logical blocks, where the logical block.
M ASS S TORAGE S TRUCTURES Lecture: Operating System Concepts Lecturer: Pooja Sharma Computer Science Department, Punjabi University, Patiala.
Presentation-4 Group-A1 Professor Mohamed Khalil Anita Kanuganti Hemanth Rao.
Part IV I/O System Chapter 12: Mass Storage Structure.
Magnetic Disks Have cylinders, sectors platters, tracks, heads virtual and real disk blocks (x cylinders, y heads, z sectors per track) Relatively slow,
Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Silberschatz, Galvin and Gagne ©2007 Chapter 11: File System Implementation.
Chapter 10: Mass-Storage Systems
Operating System (013022) Dr. H. Iwidat
Operating Systems Disk Scheduling A. Frank - P. Weisberg.
Chapter 12: Mass-Storage Structure
Operating System I/O System Monday, August 11, 2008.
Disk Scheduling Algorithms
Mass-Storage Structure
DISK SCHEDULING FCFS SSTF SCAN/ELEVATOR C-SCAN C-LOOK.
Lecture 45 Syed Mansoor Sarwar
Chapter 14 Based on the slides supporting the text
Chapter 12: Mass-Storage Systems
Operating Systems (CS 340 D)
Disk Scheduling The operating system is responsible for using hardware efficiently — for the disk drives, this means having a fast access time and disk.
Overview Continuation from Monday (File system implementation)
Disks and scheduling algorithms
Mass-Storage Systems.
Disk Scheduling The operating system is responsible for using hardware efficiently — for the disk drives, this means having a fast access time and disk.
Operating Systems Disk Scheduling A. Frank - P. Weisberg.
Presentation transcript:

Chapter 14: Mass-Storage Systems Disk Structure. Disk Scheduling. RAID.

Disk Structure Disk drives are addressed as large 1-dimensional arrays of logical blocks, where the logical block is the smallest unit of transfer. The 1-dimensional array of logical blocks is mapped into the sectors of the disk sequentially.  Sector 0 is the first sector of the first track on the outermost cylinder.  Mapping proceeds in order through that track, then the rest of the tracks in that cylinder, and then through the rest of the cylinders from outermost to innermost.

Disk Structure (Cont.)

Disk Drive Management Disk drive management goal: fast access time and high disk bandwidth. Major components of access time:  Seek time is the time for the disk motors to move the heads to the cylinder containing the desired sector.  Rotational latency is the additional time waiting for the disk to rotate the desired sector under the disk head.  Seek time far larger than rotational latency.  Seek time proportional to seek distance.  Disk scheduling minimizes seek time. Disk bandwidth: the total number of bytes transferred, divided by the total time between the first request for service and the completion of the last transfer.  Better seek time per request improves bandwidth.  Beyond this, parallelism improves bandwidth.

Disk Scheduling How should we schedule the servicing of disk I/O requests? Illustrate with queue of disk requests for blocks on listed cylinders (min cylinder: 0; max: 199): 98, 183, 37, 122, 14, 124, 65, 67 Initially, the disk head is at cylinder 53. First come, first served: total head movement is 640 cylinders.

Shortest-Seek-Time-First (SSTF) Selects the request with the minimum seek time from the current head position. May cause starvation of some requests. In example, total head movement is 236 cylinders. Like SJF but not optimal (we use different measure here): if we go from 53 to 14, and service 65, 67 later, total is 208.

SCAN Head starts at one end of the disk, and moves toward the other end, servicing requests until it gets there. Then, the head starts moving in the opposite direction and servicing continues. Sometimes called the elevator algorithm. Easier on the hardware (less wear). In example, total head movement is 236 cylinders.

C-SCAN Head starts at first end of the disk, and moves toward the other end, servicing requests until it gets to the other end of the disk. Then, the head returns to first end, without servicing requests on the return trip. Provides a more uniform wait time than SCAN: if going right and head is at cylinder 1 when request for cylinder 0 arrives, we’ll travel 399 cylinders before we service it. “C” comes from thinking of cylinders as if in circular list.

C-LOOK Like C-SCAN, but head only goes as far as the last request in each direction. LOOK is like SCAN: service both ways, but turn if nothing appears if we look ahead.

Selecting a Disk-Scheduling Algorithm Either SSTF (most common) or LOOK is a reasonable choice for a default system algorithm. SCAN and C-SCAN perform better for systems that place a heavy load on the disk (they are more fair). Performance depends on the number and types of requests. So the disk-scheduling algorithm should be written as a separate module of the operating system, allowing it to be replaced with a different algorithm if necessary, possibly while system is running. Requests for disk service can be influenced by the file- allocation method.

RAID Structure RAID: Redundant Array of Inexpensive/Independent Disks. With multiple disks, how can we store our data onto them? Want to balance:  Performance: fast I/O.  Reliability: avoid data loss if (part of) a drive fails. Ideal balance depends on system need. Hence many RAID levels. Software RAID (Windows 2000): unusably slow. Hardware RAID: <$300 for a 6-drive controller (must pay extra for memory). Assignment 4.

RAID Performance Given 3 identical disks, each with 3 blocks, provide abstraction of single disk with 9 blocks.  Basic block organization:  Striped block organization:  If a file spans blocks 0-2, then the time to read file is  Basic: 3 x block I/O time.  Striped: block I/O time since all disks do I/O simultaneously. Block 0 Block 1 Block 3 Block 4 Disk 0Disk 1 Block 6 Block 7 Disk 2 Block 2Block 5Block 8 Block 0 Block 3 Block 1 Block 4 Disk 0Disk 1 Block 2 Block 5 Disk 2 Block 6Block 7Block 8 Stripe 0 Stripe 1 Stripe 2

RAID Reliability Mirroring or shadowing: keep a duplicate of each block somewhere else. Simplest is to copy each disk onto another. Parity: steal one block from each stripe. Store XOR (^) sum of all other stripe blocks in it. Block 0 Block 2 Block 1 Block 3 Disk 0Disk 1 Stripe 0 Stripe1 Disk 2: Parities Block 4Block 5Stripe 2 A B P=A^B P^A=B! P^B=A! Hence if Disk 1 (B) fails, I can rebuild its blocks from Disks 0 (A) and 2 (P). Similarly for Disk 2 failing.

RAID Reliability (Cont.) Parity updates:  If Block 0 changes (A becomes A’), how do I update parity?  Slow: P’ = A’ ^ B ^ C ^ D...  Fast: P’ = A’ ^ B ^ C ^ D... = A’ ^ (A ^ A) ^ B ^ C ^ D... = A’ ^ A ^ P. So parity disk participates in every write! To reduce overuse and premature failure, distribute parity: Read-modify-write: 2 reads, 2 writes Parity 0 Block 2 Block 0 Parity 1 Disk 0Disk 1 Block 1 Block 3 Disk 2 Block 4Block 5Parity 2 Controller needs on-board memory to perform this computation.

RAID Levels Striping only. For each primary disk, a secondary disk is an exact copy of it (mirror). No striping. Striping and parity. Parity on one disk. Replace parity with memory style error-correcting codes: rarely used. Parity with striping of bits, not blocks: rarely used. Striping and parity. Distributed parity. Striping and parity-like Reed- Solomon codes: protect against multiple disk failures. Uncommon.

RAID Levels (Cont.) 0+1: a stripe is mirrored, but individual disks may be different, e.g. Block 0 Block 5 Block 1 Block 4 Disk 0ADisk 1A Block 2 Block 3 Disk 2A Block 6Block 7Block 8 Block 0 Block 3 Block 1 Block 4 Disk 0BDisk 1B Block 2 Block 5 Disk 2B Block 6Block 7Block 8 0A is not duplicate of 0B. If 0A fails, 0B cannot take its place: 1A, 2A become useless and no longer enhance RAID reliability.