CS 346 – Chapter 10 Mass storage –Advantages? –Disk features –Disk scheduling –Disk formatting –Managing swap space –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 Chapter 11. I/O Driver OS module which controls an I/O device hides the device specifics from the above layers in the.
I/O Management and Disk Scheduling
CS 346 – April 4 Mass storage –Disk formatting –Managing swap space –RAID Commitment –Please finish chapter 12.
Faculty of Information Technology Department of Computer Science Computer Organization Chapter 7 External Memory Mohammad Sharaf.
Section 6.2. Record data by magnetizing the binary code on the surface of a disk. Data area is reusable Allows for both sequential and direct access file.
CS 6560: Operating Systems Design
Disk Scheduling Based on the slides supporting the text 1.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Disks and RAID.
1 Storage (cont’d) Disk scheduling Reducing seek time (cont’d) Reducing rotational latency RAIDs.
Other Disk Details. 2 Disk Formatting After manufacturing disk has no information –Is stack of platters coated with magnetizable metal oxide Before use,
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 12: Mass-Storage Systems.
1 Lecture 26: Storage Systems Topics: Storage Systems (Chapter 6), other innovations Final exam stats:  Highest: 95  Mean: 70, Median: 73  Toughest.
Based on the slides supporting the text
CS 342 – Operating Systems Spring 2003 © Ibrahim Korpeoglu Bilkent University1 Input/Output – 5 Disks CS 342 – Operating Systems Ibrahim Korpeoglu Bilkent.
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.
Operating Systems COMP 4850/CISG 5550 Disks, Part II Dr. James Money.
12.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 12: Mass-Storage Systems.
CS4432: Database Systems II Data Storage (Better Block Organization) 1.
Chapter 6 RAID. Chapter 6 — Storage and Other I/O Topics — 2 RAID Redundant Array of Inexpensive (Independent) Disks Use multiple smaller disks (c.f.
CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst Storage Systems.
1 Recitation 8 Disk & File System. 2 Disk Scheduling Disks are at least four orders of magnitude slower than main memory –The performance of disk I/O.
Redundant Array of Independent Disks
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.
1 Operating Systems Part VI: Mass- Storage Structure.
I/O – Chapter 8 Introduction Disk Storage and Dependability – 8.2 Buses and other connectors – 8.4 I/O performance measures – 8.6.
Lecture 9 of Advanced Databases Storage and File Structure (Part II) Instructor: Mr.Ahmed Al Astal.
1 Lecture 8: Secondary-Storage Structure 2 Disk Architecture Cylinder Track SectorDisk head rpm.
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 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.
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.
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  Operating System Concepts Chapter 14: Mass-Storage Systems Disk Structure Disk Scheduling Disk Management Swap-Space.
External Storage Primary Storage : Main Memory (RAM). Secondary Storage: Peripheral Devices –Disk Drives –Tape Drives Secondary storage is CHEAP. Secondary.
Chapter 12 – Mass Storage Structures (Pgs )
Chapter 8 External Storage. Primary vs. Secondary Storage Primary storage: Main memory (RAM) Secondary Storage: Peripheral devices  Disk drives  Tape.
Operating Systems (CS 340 D) Princess Nora University Faculty of Computer & Information Systems Computer science Department.
Chapter 14: Mass-Storage Systems Disk Structure. Disk Scheduling. RAID.
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.
Programmer’s View of Files Logical view of files: –An a array of bytes. –A file pointer marks the current position. Three fundamental operations: –Read.
Part IV I/O System Chapter 12: Mass Storage Structure.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts Essentials – 2 nd Edition Chapter 9: Mass-Storage Systems.
CS422 Principles of Database Systems Disk Access Chengyu Sun California State University, Los Angeles.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 10: Mass-Storage Systems.
Magnetic Disks Have cylinders, sectors platters, tracks, heads virtual and real disk blocks (x cylinders, y heads, z sectors per track) Relatively slow,
1 Chapter 11 I/O Management and Disk Scheduling Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems DISK I/0.
Operating System (013022) Dr. H. Iwidat
Multiple Platters.
Disks and RAID.
I/O System Chapter 5 Designed by .VAS.
CS 554: Advanced Database System Notes 02: Hardware
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.
Chapter 14 Based on the slides supporting the text
Chapter 12: Mass-Storage Systems
Overview Continuation from Monday (File system implementation)
Disks and scheduling algorithms
Disk Scheduling The operating system is responsible for using hardware efficiently — for the disk drives, this means having a fast access time and disk.
Presentation transcript:

CS 346 – Chapter 10 Mass storage –Advantages? –Disk features –Disk scheduling –Disk formatting –Managing swap space –RAID

Disks Anatomy (Figure 10.1) –Sector, track, cylinder, platter –Read/write head attached to arm, attached to arm assembly –Head quickly reads binary data as: orientation of iron ions or reflectiveness of surface Example: CD –About 25,000 tracks, 50 sectors per track  1 bit occupies about 1 square  m –Entire CD can be read in about 7 minutes on a 12x speed drive But usually we don’t read entire disks 2 aspects dominate access time: –Seek time: proportional to square root of seek distance –Rotational latency

Some specs Floppy diskHard drive (2001)Hard drive (2011) Cylinders Tracks/cylinder21216 Sectors/track9281 (average)63 Sectors/disk Bytes/sector512 Capacity360 KB18 GB160 GB Seek adjacent track6 ms0.8 ms Seek (average)77 ms6.9 ms9.5 ms Rotation200 ms8.3 ms Transfer 1 sector22 ms 17  s1.7  s

Disk scheduling Common problem is a backup of disk requests Disk queue When disk is ready, in what order should it do the disk requests? Similar to problem of scheduling CPU Pending jobs are classified by which track/cylinder they want to access Ex. 4, 7, 16, 2, 9, 1, 9, 5, 6 Several disk scheduling algorithms exist –Simple approach: first-come, first-served –Total head movement = ? –Want to reduce total seeking time or head movement: avoid “wild swings”. –Would be nice not to finish at extreme sector number.

Scheduling (2) Shortest seek first –For 4, 7, 16, 2, 9, 1, 9, 5, 6: After serving track 4, where do we go next? Total head movement = ? –Very good but not optimal Elevator algorithm (“scan” method) –Pick a direction and go all the way to end, then come back and handle all other requests. –Better than Shortest Seek in our example? Circular scan –Same as elevator algorithm BUT: when you reach the end you immediately go to the other end without stopping for requests. In other words, you only do work as head is moving in 1 direction. Look scheduling: modify elevator & circular scan so you only go as far as highest/lowest request

Disk mgmt Low-level (physical) formatting –Dividing disk medium into sectors –Besides data, sector contains error-correcting code –Later, disk controller will manipulate individual sectors High-level (logical) formatting –Record a data structure for file system on disk –Partition groups of cylinders if desired –Associate adjacent blocks into logical clusters to support file I/O “Sector sparing”: compensate for bad blocks! –Maintain list of bad blocks; replace each with a spare one Boot from disk: boot blocks in predefined locations contain system code to load  “boot partition” of drive

Swap space Recall: used in virtual memory to store pages evicted from RAM –Faster to return to RAM than loading from file from scratch –In effect: disk space is now being used as extension of main memory, the very essence of VM Logically a separate partition of the disk from the file system When process started, it’s given some swap space Swap map: kernel data structure to track usage –Associate an counter value with each page in swap area –0 means that page is available to swap into –Positive number: number of processes using that swapped-out data (> 1 means it’s shared data)

RAID Increasingly practical to have several disks on a system –But increases probability & mean time to failure RAID = “redundant array of independent disks” –Redundancy: fault tolerance technique Six “levels” or strategies of RAID: use various combinations of fault tolerant techniques Typical RAID techniques in use –Striping a group of disks: split bits of each byte across disks Or block-level striping: split blocks of a file… –Mirroring another disk –Store parity (error-correcting) bits on another disk –Leaving some disks empty until needed to replace failed disk

RAID levels Various combinations of techniques… For example: RAID 0 – block striping; no mirroring or parity bits RAID 1 – add mirrored disks RAID 2, 3, 4 – extra disks store parity bits –If 1 disk fails, remaining bits of each byte and error-correction bit can be used to construct lot bit of each byte. –RAID 3 – bit-interleaved parity –RAID 4 – block-interleaved parity RAID 0+1 – a set of disks is striped, and then the stripe is mirrored to another disk RAID 1+0 – disks are mirrored into a pair of disks. This pair is then striped.

RAID extensions RAID is designed just to detect & handle disk failure Does not prevent/detect data corruption, etc. –Could be pointing to wrong file, wrong block Checksum for data and metadata on disk –Ex. For each disk block, how many bits are set? –Store with pointer to object (See Figure 10.13) –Detect whether it has changed. Grab correct data from the mirror. RAID also somewhat inflexible because its techniques require a certain number of disks. What to do?