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

Similar documents
Chapter 14: Mass-Storage Systems

Today: Secondary Storage! Typical Disk Parameters!

Module 13: Secondary-Storage

Chapter 14: Mass-Storage Systems. Disk Structure

Module 13: Secondary-Storage Structure

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

Tape pictures. CSE 30341: Operating Systems Principles

Mass-Storage Structure

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

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

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

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

V. Mass Storage Systems

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

Silberschatz, et al. Topics based on Chapter 13

MASS-STORAGE STRUCTURE

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

CSE 153 Design of Operating Systems Fall 2018

Chapter 10: Mass-Storage Systems

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

Storage. CS 3410 Computer System Organization & Programming

Chapter 12: Mass-Storage

Mass-Storage. ICS332 Operating Systems

Disk Scheduling. Based on the slides supporting the text

UNIT 4 Device Management

CSE 153 Design of Operating Systems

Chapter 14 Mass-Storage Structure

Administrivia. CMSC 411 Computer Systems Architecture Lecture 19 Storage Systems, cont. Disks (cont.) Disks - review

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

Chapter 10: Mass-Storage Systems

STORAGE SYSTEMS. Operating Systems 2015 Spring by Euiseong Seo

CS3600 SYSTEMS AND NETWORKS

Chapter 11. I/O Management and Disk Scheduling

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

Storage Systems. Storage Systems

Mass-Storage Structure

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

Ref: Chap 12. Secondary Storage and I/O Systems. Applied Operating System Concepts 12.1

Hard Disk Drives (HDDs) Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Lecture 9. I/O Management and Disk Scheduling Algorithms

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

Hard Disk Drives (HDDs)

Database Systems II. Secondary Storage

CS420: Operating Systems. Mass Storage Structure

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

Chapter 14: Mass-Storage Systems

Lecture 29. Friday, March 23 CS 470 Operating Systems - Lecture 29 1

CMSC 424 Database design Lecture 12 Storage. Mihai Pop

Introduction to I/O and Disk Management

Introduction to I/O and Disk Management

CSE 380 Computer Operating Systems

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

OPERATING SYSTEMS CS3502 Spring Input/Output System Chapter 9

CSE 451: Operating Systems Spring Module 12 Secondary Storage

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

Virtual Memory. Reading. Sections 5.4, 5.5, 5.6, 5.8, 5.10 (2) Lecture notes from MKP and S. Yalamanchili

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

Chapter 11 I/O Management and Disk Scheduling

Chapter-6. SUBJECT:- Operating System TOPICS:- I/O Management. Created by : - Sanjay Patel

Ch 11: Storage and File Structure

Chapter 10: Mass-Storage Systems

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

I/O Management and Disk Scheduling. Chapter 11

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

Operating Systems. Mass-Storage Structure Based on Ch of OS Concepts by SGG

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

Input/Output. Chapter 5: I/O Systems. How fast is I/O hardware? Device controllers. Memory-mapped I/O. How is memory-mapped I/O done?

Storage and File Structure. Classification of Physical Storage Media. Physical Storage Media. Physical Storage Media

Secondary storage. CS 537 Lecture 11 Secondary Storage. Disk trends. Another trip down memory lane

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

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

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

Chapter 11: Mass-Storage Systems

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

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

CSE380 - Operating Systems. Communicating with Devices

Operating Systems Peter Pietzuch

OPERATING SYSTEMS CS3502 Spring Input/Output System Chapter 9

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

Storage systems. Computer Systems Architecture CMSC 411 Unit 6 Storage Systems. (Hard) Disks. Disk and Tape Technologies. Disks (cont.

Department of Computer Engineering University of California at Santa Cruz. File Systems. Hai Tao

Operating Systems. Operating Systems Professor Sina Meraji U of T

UNIT-7. Overview of Mass Storage Structure

I/O 1. Devices and I/O. key concepts device registers, device drivers, program-controlled I/O, DMA, polling, disk drives, disk head scheduling

EIDE, ATA, SATA, USB,

Chapter 12: Mass-Storage

Chapter 12: Mass-Storage

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

COS 318: Operating Systems. Storage Devices. Jaswinder Pal Singh Computer Science Department Princeton University

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

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

Free Space Management

Chapter 7: Mass-storage structure & I/O systems. Operating System Concepts 8 th Edition,

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

Disk Scheduling COMPSCI 386

I/O Systems and Storage Devices

COS 318: Operating Systems. Storage Devices. Vivek Pai Computer Science Department Princeton University

UNIT 2 Data Center Environment

Transcription:

November 21, 2006

The memory hierarchy Red = Level Access time Capacity Features Registers nanoseconds 100s of bytes fixed Cache nanoseconds 1-2 MB fixed RAM nanoseconds MBs to GBs expandable Disk milliseconds 100s of GBs stable, expandable CD, DVD ROM 10s of milliseconds MBs to GBs stable, removeable Tape seconds hours 1000s of GBs stable, removeable

Use and management Organization Access Scheduling

How disks are used Use and management Organization Access Scheduling provide stable storage Persists when power is turned off Stores OS kernel, executable programs, user files Processes perform file I/O Filesystem translates these into disk I/O

Interesting facts Use and management Organization Access Scheduling The basic design of hard disks has not changed since the 1960s Storage capacities have increased enormously Transfer rates keep increasing (due to increased storage density), but seek times stay relatively constant Other technologies on the horizon? MEMs Holographic storage

Partitioning Use and management Organization Access Scheduling Disk can be divided into multiple partitions (logical disks) Typical disk layout:

Boot block Use and management Organization Access Scheduling Most systems boot the OS from a disk The OS installs a boot block to initiate loading of the OS Boot process: CPU initialized, loads bootstrap program from ROM Bootstrap program loads the boot block from disk Boot block usually loads a second stage loader Second stage loader loads the OS kernel

A disk read Use and management Organization Access Scheduling When the kernel needs to read data from a disk: 1. Program the disk controller with the address of the data on the disk 2. Wait for read to complete (other tasks may run in the meantime) 3. Controller raises an interrupt when request completes 4. Copy data from controller Controller may do this automatically using DMA 5. Thread or process that issued the request may continue

A disk write Use and management Organization Access Scheduling When the kernel wants to write data to the disk: 1. Program disk controller with disk address to be written 2. Copy data to controller Or arrange for DMA

Disk organization Use and management Organization Access Scheduling

Disk organization Use and management Organization Access Scheduling Drives usually contain multiple platters Disk arms are connected, heads move together

Disk access Use and management Organization Access Scheduling Smallest addressable unit of disk storage: sector or block Usually 512 bytes Sector size can be changed by a low-level format Sector addressing CHS: cylinder, head (track), sector LBA: logical block address For disk with N sectors, sectors assigned numbers from 0..N All modern disks and OSes use LBA

Low-level formatting Use and management Organization Access Scheduling How is data physically stored? Each sector on the disk has extra information (in addition to the sector data), generated by low-level formatting Sector number Error-correcting code Extra information allows Errors to be detected and corrected Blocks to be moved Users generally never need to do low-level format

Performance factors Use and management Organization Access Scheduling Performance factors Seek time: time for heads to move to desired track Rotational latency: time for disk to spin to desired sector Typical values 8 milliseconds avg. seek 4 milliseconds avg. latency Seeks are slow! 2 GHz CPU executes 1.6 million cycles in 8 milliseconds However, transfer rate is high (10 s or 100 s MB/sec) Once the heads are in the right place

Real disks Use and management Organization Access Scheduling Complicating factors for real disk drives: Outer tracks have more sectors than inner tracks Bad blocks Some sectors will have defects Drive remaps these to good sectors elsewhere Hopefully near original location, but maybe not However, logical block address generally reflects physical geometry Sectors with close LBAs should be near each other (generally, in same cylinder)

Disk scheduling Use and management Organization Access Scheduling Model: queued requests to read/write disk blocks How should the OS schedule the requests so that they complete as quickly as possible? = Minimize seek time (head movement) In theory, we could also try to minimize rotational latency Hard to do, because the OS generally doesn t know the real disk geometry

FCFS: First Come, First Served Use and management Organization Access Scheduling Lots of unnecessary head movement can do better

SSTF: Shortest Seek Time First Use and management Organization Access Scheduling Better, but requests to far cylinders may be starved

SCAN (Elevator algorithm) Use and management Organization Access Scheduling Move head back and forth across disk Less prone to starvation, but outer cylinders wait longer

C-SCAN ( Circular SCAN ) Use and management Organization Access Scheduling Only handle requests in one direction, then wrap All cylinders serviced with uniform frequency

LOOK, C-LOOK Use and management Organization Access Scheduling SCAN and C-SCAN traverse entire disk, even if there are no further requests in current direction LOOK and C-LOOK reverse head motion as soon as possible Eliminates some unnecessary head movement with slight reduction in fairness

Tagged queueing Use and management Organization Access Scheduling So far we ve assumed only one request can be active However, most modern disk drives/controllers can support multiple outstanding requests Allows controller and drive to do further scheduling and optimization E.g., if we dispatch multiple requests for sectors in the same cylinder, disk can order them to take rotational latency into account Controller tells kernel which requests have completed

concepts levels

concepts concepts levels Need for more storage capacity that would fit on one disk: Enterprise-wide user directories Large databases Document archives etc. Redundant Array of Independent Create a very large virtual disk out of multiple disk drives Use multiple disks to increase Throughput Reliability

Disk performance concepts levels Some applications need to read or write faster than the transfer rate of a single disk E.g., satellite data, medical imaging, physics experiments May need 100 GBs/sec of I/O Using multiple disks, I/O can proceed in parallel

Disk reliability concepts levels MTBF: Mean Time Between Failures For a single disk, MTBF is large (10 6 hours or more) For N disks with MTBF of m, mean time between failure of any disk is m/n E.g., for 1000 disks with MTBF of 10 6 hours, MBTF is 1000 hours, about 42 days! Redundancy is needed Assume a relatively small replacement time (hours) for a failed disk Probability of independent failures of two disks within the replacement time is very small

levels concepts levels There are many ways to organize multiple disks to achieve better throughput and/or reliability These are described as levels: 0, 1, etc. The numbers do not really mean anything

levels 0 and 1 concepts levels 0: Also known as striping Logical block 0 on disk 0, logical block 1 on disk 1, etc. Multiple blocks can be transferred in parallel: higher transfer rate No redundancy 1: Also known as mirroring Blocks 0..n on disk 0, n+1..2n on disk 1, etc. Each disk in the array has a mirror with same contents If one disk fails, use mirror Generally, no parallelism for individual requests Since adjacent logical blocks are on the same disk

2 concepts levels Memory-style error correcting organization Stripe bytes of data across disks Dedicate some disks to store error correcting codes for those bytes Automatically detect and correct single bit errors This scheme is not generally used in practice

3 concepts levels Bit-interleaved parity organization Rely on fact that disk drives can reliably detect errors Like 2, stripe bytes across disks Use dedicated disks to store parity for each byte On a single disk error: Compute parity of good bits, compare with known parity bit If parity of good bits matches known parity, damaged bit is 0 Otherwise, damaged bit is 1

4 concepts levels Block-interleaved parity organization Like 4, but blocks are interleaved on data disks With array of n disks, each parity block stores parity for n 1 data blocks Using good blocks and parity block, any damaged data block can be reconstructed Read operations for many blocks can proceed in parallel

concepts levels General critique of 3 and 4 The problem with 3 and 4 is that parity disks are a bottleneck They must be updated on every write of any associated data disk Idea: all disks should store both data and parity information

5 concepts levels Block-interleaved distributed parity Say we have n disks with S sectors each Use S parity blocks Parity block i stored on disk i mod n Data blocks stored on other disks Why is this good? Like 4, we need to write to two disks for every write of a virtual block But, with interleaving, no single disk is a bottleneck

6 concepts levels P+Q redundancy scheme Like 5, but instead of storing parity of data blocks, store error correcting code Allow recovery from multiple disk failures

concepts levels Issues with parity and error correcting codes Maintaining error correcting information imposes performance overhead Can use dedicated hardware for computation Each write still requires multiple steps to complete Time required to rebuild redundancy following a failure can be significant (many disks involved)

0+1, 1+0 concepts levels Combine levels 0 and 1 0+1: mirrored 0 arrays 1+0: stripe blocks across pairs of mirrored disks These systems have both high throughput and high reliability Rebuild: just copy a single disk, I/O to other disks can proceed as usual However, both impose 100% space overhead compared to 0 Useful for small or medium size databases

Two problems with disks: They are not removeable Relatively high cost per drive Cheap, removeable storage: Flash memory ( USB hard drive ) Optical disks (CD and DVD ROM) Might be writable once (WORM) or many times Tapes

Optical drives (CD, DVD, etc.) For reading, accessed much like fixed hard disks Some differences: Variable speed: disk rotates faster when accessing inner tracks Generally slower seek times and transfer rates than hard disks Writing: Writable CD and DVD drives don t have fully random access (sector-at-a-time) write support Streaming write model

Tapes Transfer rate similar to optical disks Differences: Sequential access: random seeks are very slow Larger capacity Cheaper Used for data backup and long-term storage

Hierarchical storage management A problem with large collections of removeable disks or tapes is that they can t be accessed transparently A robotic jukebox can solve this problem When data on a removeable disk or tape is requested, robot fetches it from library, inserts in drive Hierarchical storage management: use fixed disks as a cache for data in long-term storage Data in disk cache can be accessed very quickly Data not in cache may incur very long access time: minutes or hours However, useful for batch processing

Questions?