Mass-Storage Structure

Similar documents
I/O, Disks, and RAID Yi Shi Fall Xi an Jiaotong University

Disk Scheduling. Based on the slides supporting the text

Module 13: Secondary-Storage Structure

Chapter 14: Mass-Storage Systems. Disk Structure

CSE325 Principles of Operating Systems. Mass-Storage Systems. David P. Duggan. April 19, 2011

Disk Scheduling. Chapter 14 Based on the slides supporting the text and B.Ramamurthy s slides from Spring 2001

Chapter 10: Mass-Storage Systems

Chapter 12: Secondary-Storage Structure. Operating System Concepts 8 th Edition,

Chapter 13: Mass-Storage Systems. Disk Scheduling. Disk Scheduling (Cont.) Disk Structure FCFS. Moving-Head Disk Mechanism

Chapter 13: Mass-Storage Systems. Disk Structure

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University

CS3600 SYSTEMS AND NETWORKS

Chapter 12: Mass-Storage Systems. Operating System Concepts 8 th Edition,

V. Mass Storage Systems

CS420: Operating Systems. Mass Storage Structure

Chapter 14: Mass-Storage Systems

Chapter 10: Mass-Storage Systems

Chapter 10: Mass-Storage Systems. Operating System Concepts 9 th Edition

EIDE, ATA, SATA, USB,

CHAPTER 12: MASS-STORAGE SYSTEMS (A) By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

Module 13: Secondary-Storage

Chapter 12: Mass-Storage

OPERATING SYSTEMS CS3502 Spring Input/Output System Chapter 9

OPERATING SYSTEMS CS3502 Spring Input/Output System Chapter 9

Mass-Storage. ICS332 - Fall 2017 Operating Systems. Henri Casanova

Overview of Mass Storage Structure

Chapter 12: Mass-Storage

Chapter 12: Mass-Storage

Free Space Management

Mass-Storage Structure

Silberschatz, et al. Topics based on Chapter 13

Chapter 10: Mass-Storage Systems

Today: Secondary Storage! Typical Disk Parameters!

Lecture 9. I/O Management and Disk Scheduling Algorithms

Chapter 12: Mass-Storage Systems. Operating System Concepts 8 th Edition,

Disks and RAID. CS 4410 Operating Systems. [R. Agarwal, L. Alvisi, A. Bracy, E. Sirer, R. Van Renesse]

Mass-Storage. ICS332 Operating Systems

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 420, York College. November 21, 2006

File. File System Implementation. Operations. Permissions and Data Layout. Storing and Accessing File Data. Opening a File

Disk scheduling Disk reliability Tertiary storage Swap space management Linux swap space management

Tape pictures. CSE 30341: Operating Systems Principles

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto

CS370: System Architecture & Software [Fall 2014] Dept. Of Computer Science, Colorado State University

Chapter 10: Mass-Storage Systems. Operating System Concepts 9 th Edition

Chapter 14: Mass-Storage Systems

MASS-STORAGE STRUCTURE

CS370: Operating Systems [Fall 2018] Dept. Of Computer Science, Colorado State University

CS370 Operating Systems

CS370: Operating Systems [Fall 2018] Dept. Of Computer Science, Colorado State University

Mass-Storage Systems. Mass-Storage Systems. Disk Attachment. Disk Attachment

Storage. CS 3410 Computer System Organization & Programming

File. File System Implementation. File Metadata. File System Implementation. Direct Memory Access Cont. Hardware background: Direct Memory Access

Magnetic Disk. Optical. Magnetic Tape. RAID Removable. CD-ROM CD-Recordable (CD-R) CD-R/W DVD

I/O Systems and Storage Devices

CSE 380 Computer Operating Systems

Part IV I/O System. Chapter 12: Mass Storage Structure

I/O Device Controllers. I/O Systems. I/O Ports & Memory-Mapped I/O. Direct Memory Access (DMA) Operating Systems 10/20/2010. CSC 256/456 Fall

CS370: Operating Systems [Spring 2017] Dept. Of Computer Science, Colorado State University

CSE 451: Operating Systems Winter Secondary Storage. Steve Gribble. Secondary storage

Chapter 6 External Memory

CISC 7310X. C11: Mass Storage. Hui Chen Department of Computer & Information Science CUNY Brooklyn College. 4/19/2018 CUNY Brooklyn College

Disks. Storage Technology. Vera Goebel Thomas Plagemann. Department of Informatics University of Oslo

Operating Systems 2010/2011

I/O & Storage. Jin-Soo Kim ( Computer Systems Laboratory Sungkyunkwan University

William Stallings Computer Organization and Architecture 6 th Edition. Chapter 6 External Memory

Lecture 23: Storage Systems. Topics: disk access, bus design, evaluation metrics, RAID (Sections )

Chapter 12: Mass-Storage Systems. Operating System Concepts 8 th Edition

Chapter 11: Mass-Storage Systems

CSCI-GA Database Systems Lecture 8: Physical Schema: Storage

Chapter 14 Mass-Storage Structure

William Stallings Computer Organization and Architecture 8 th Edition. Chapter 6 External Memory

I/O Management and Disk Scheduling. Chapter 11

Chapter 12: Mass-Storage Systems. Operating System Concepts 9 th Edition

Database Systems II. Secondary Storage

CSE 451: Operating Systems Spring Module 12 Secondary Storage

Mass-Storage Systems

Disc Allocation and Disc Arm Scheduling?

CS510 Operating System Foundations. Jonathan Walpole

CSCI-GA Operating Systems. I/O : Disk Scheduling and RAID. Hubertus Franke

Appendix D: Storage Systems

CSE 451: Operating Systems Winter Lecture 12 Secondary Storage. Steve Gribble 323B Sieg Hall.

Chapter 9: Peripheral Devices: Magnetic Disks

Introduction to I/O and Disk Management

Part IV I/O System Chapter 1 2: 12: Mass S torage Storage Structur Structur Fall 2010

Introduction to I/O and Disk Management

COMP283-Lecture 3 Applied Database Management

Principles of Operating Systems CS 446/646

CS370 Operating Systems

Chapter 11. I/O Management and Disk Scheduling

Magnetic Disks. Tore Brox-Larsen Including material developed by Pål Halvorsen, University of Oslo (primarily) Kai Li, Princeton University

STORAGE SYSTEMS. Operating Systems 2015 Spring by Euiseong Seo

CMSC 424 Database design Lecture 12 Storage. Mihai Pop

Mass Storage. 2. What are the difference between Primary storage and secondary storage devices? Primary Storage is Devices. Secondary Storage devices

CSE 451: Operating Systems Spring Module 12 Secondary Storage. Steve Gribble

Computer System Architecture

Chapter 5: Input Output Management. Slides by: Ms. Shree Jaswal

Operating Systems. Designed and Presented by Dr. Ayman Elshenawy Elsefy

Chapter 12: Mass-Storage Systems

CSE 120. Operating Systems. March 27, 2014 Lecture 17. Mass Storage. Instructor: Neil Rhodes. Wednesday, March 26, 14

I/O CANNOT BE IGNORED

Transcription:

CS 4410 Operating Systems Mass-Storage Structure Summer 2011 Cornell University 1

Today How is data saved in the hard disk? Magnetic disk Disk speed parameters Disk Scheduling RAID Structure 2

Secondary Storage Save data permanently. Slower than memory. Cheaper and greater than memory. Magnetic Tapes Magnetic Disks 3

Magnetic Disks Then 4

Magnetic Disks Now 5

Magnetic Disk: Internal 6

Disk Speed To read from disk, we must specify: cylinder #, surface #, sector #, transfer size, memory address Disk speed has two parts: Transfer rate: the rate at which data flow between the drive and the computer. Positioning time: Seek time: the time to move the disk arm to the desired cylinder. Rotational latency: the time for the desired sector to rotate to the disk head. Sector Track Seek Time Rotational latency 7

Disks vs Memory Smallest write: sector Atomic write = sector Random access: 5ms Sequential access: 200MB/s Cost $.002MB Crash: no loss ( nonvolatile ) (usually) bytes byte, word 50ns 200-1000MB/s $.10MB Contents gone ( volatile ) 8

Disk Structure Disk drives addressed as 1-dim arrays of logical blocks. The logical block is the smallest unit of transfer. Usually 512 bytes. This array mapped sequentially onto disk sectors. Address 0 is 1 st sector of 1 st track of the outermost cylinder. Addresses incremented within track, then within tracks of the cylinder, then across cylinders, from outermost to innermost. Translation is theoretically possible, but usually difficult. Some sectors might be defective. Number of sectors per track is not a constant. 9

Number of sectors per track Uniform Number of sectors per track. Reduce bit density per track for outer layers. Constant Linear Velocity. Typically HDDs. Non-uniform Number of sectors per track. Have more sectors per track on the outer layers. Increase rotational speed when reading from outer tracks. Constant Angular Velocity Typically CDs, DVDs. 10

Disk Scheduling Whenever a process needs to read or write to the disk: It issues a system call to the OS. If the controller is available, the request is served. Else, the request is placed in the pending requests queue of the driver. When a request is completed, the OS decides which is the next request to service. How does the OS make this decision? On which criteria? 11

Disk Scheduling The OS tries to use the disk efficiently. Target: Small access time and large bandwidth. The target can be achieved by managing the order in which disk I/O requests are serviced. Different algorithms can be used. 12

FCFS Consider a disk queue with requests for I/O to blocks on cylinders: 98, 183, 37, 122, 14, 124, 65, 67 The disk head is initially at cylinder 53. Total head movement of 640 cylinders 13

SSTF Selects request with minimum seek time from current head position SSTF scheduling is a form of SJF scheduling May cause starvation of some requests. Total head movement of 236 cylinders 14

SCAN The disk arm starts at one end of the disk. Moves toward the other end, servicing requests. Head movement is reversed when it gets to the other end of disk. Servicing continues. Total head movement of 208 cylinders 15

C-SCAN Provides a more uniform wait time than SCAN. The head moves from one end of the disk to the other. Servicing requests as it goes. When it reaches the other end it immediately returns to the beginning of the disk. 16

C-LOOK Arm only goes as far as last request in each direction. Then reverses direction immediately. 17

RAID Structure Disks are improving, but not as fast as CPUs. 1970s seek time: 50-100 ms. 2000s seek time: <5 ms. Factor of 20 improvement in 3 decades We can use multiple disks for improving performance. By Striping files across multiple disks (placing parts of each file on a different disk), parallel I/O can improve access time. Striping reduces reliability. 100 disks have 1/100th mean time between failures of one disk So, we need Striping for performance, but we need something to help with reliability / availability. To improve reliability, we can add redundant data to the disks, in addition to Striping 18

RAID Structure A RAID is a Redundant Array of Independent Disks. Disks are small and cheap, so it s easy to put lots of disks in one box for increased storage, performance, and availability. Data plus some redundant information is Striped across the disks in some way. 19

Raid Level 0 Level 0 is non-redundant disk array. Files are Striped across disks, no redundant info. High read throughput. Best write throughput (no redundant info to write). Any disk failure results in data loss. Stripe 0 Stripe 1 Stripe 2 Stripe 3 Stripe 4 Stripe 5 Stripe 6 Stripe 7 Stripe 8 Stripe 9 Stripe 10 Stripe 11 data disks 20

Raid Level 1 Mirrored Disks Data is written to two places. On failure, just use surviving disk. On read, choose fastest to read. Write performance is same as single drive, read performance is 2x better. Expensive Stripe 0 Stripe 1 Stripe 2 Stripe 3 Stripe 0 Stripe 1 Stripe 2 Stripe 3 Stripe 4 Stripe 5 Stripe 6 Stripe 7 Stripe 4 Stripe 5 Stripe 6 Stripe 7 Stripe 8 Stripe 9 Stripe 10 Stripe 11 Stripe 8 Stripe 9 Stripe 10 Stripe 11 data disks mirror copies 21

Raid Level 2 Bit-level Striping with ECC codes for error correction. All 7 disk arms are synchronized and move in unison. Complicated controller. Single access at a time. Tolerates only one error, but with no performance degradation. Bit 0 Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 data disks ECC disks 22

Raid Level 3 Use a parity disk. Each bit on the parity disk is a parity function of the corresponding bits on all the other disks. A read accesses all the data disks. A write accesses all data disks plus the parity disk. On disk failure, read remaining disks plus parity disk to compute the missing data. Bit 0 Bit 1 Bit 2 Bit 3 Parity data disks Parity disk 23

Raid Level 4 Combines Level 0 and 3 block-level parity with Stripes. A read accesses all the data disks. A write accesses all data disks plus the parity disk. Heavy load on the parity disk. Stripe 0 Stripe 1 Stripe 2 Stripe 3 P0-3 Stripe 4 Stripe 5 Stripe 6 Stripe 7 P4-7 Stripe 8 Stripe 9 Stripe 10 Stripe 11 P8-11 data disks Parity disk 24

Raid Level 5 Block Interleaved Distributed Parity. Like parity scheme, but distribute the parity info over all disks (as well as data over all disks). Better read performance, large write performance. Stripe 0 Stripe 1 Stripe 2 Stripe 3 P0-3 Stripe 4 Stripe 5 Stripe 6 P4-7 Stripe 7 Stripe 8 Stripe 9 P8-11 Stripe 10 Stripe 11 data and parity disks 25

Today How is data saved in the hard disk? Magnetic disk Disk speed parameters Disk Scheduling RAID Structure 26