Silberschatz, Galvin and Gagne ©2009 Edited by Khoury, 2015 Operating System Concepts – 9 th Edition, Chapter 10: Mass-Storage Structure.

Slides:



Advertisements
Similar presentations
Overview of Mass Storage Structure
Advertisements

Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Mass-Storage Systems Revised Tao Yang.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 14: Mass-Storage Systems  Disk Structure  Disk Scheduling  Disk Management.
1 File Systems Chapter Files 6.2 Directories 6.3 File system implementation 6.4 Example file systems.
14.1 Silberschatz, Galvin and Gagne ©2003 Operating System Concepts with Java Chapter 14: Mass-Storage Systems Disk Structure Disk Scheduling Disk Management.
Chapter 12: Mass-Storage Structures
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 12: Mass-Storage Systems.
Mass-Storage Structure
Chapter 12: Secondary-Storage Structure Silberschatz, Galvin and Gagne ©2005 Operating System Principles 12.1 Overview of Mass Storage Structure.
Disks.
Disks CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Mass-Storage Systems Revised Tao Yang.
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.
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.
Mass Storage System EMELIZA R. YABUT MSIT. Overview of Mass Storage Structure Traditional magnetic disks structure ◦Platter- composed of one or more.
Moving-head Disk Mechanism Rotation Speeds: 60 to 200 rotations per second Head Crash: read-write head makes contact with the surface.
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
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 14: Mass-Storage Systems Disk Structure Disk Scheduling Disk Management Swap-Space.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 10: Mass-Storage Systems Modified.
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 Operating Systems Part VI: Mass- Storage Structure.
1 Lecture 8: Secondary-Storage Structure 2 Disk Architecture Cylinder Track SectorDisk head rpm.
IOS103 OPERATING SYSTEM MASS-STORAGE STRUCTURE. Objectives At the end of the course, the student should be able to: Discuss structure of a disk; Discuss.
Mass-Storage Systems. Objectives  physical structure of secondary and tertiary storage devices  performance characteristics of mass-storage devices.
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.
Chapter 12: Secondary-Storage Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 12: Mass-Storage Systems Overview of.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 14: Mass-Storage Systems Disk Structure Disk Scheduling Disk Management Swap-Space.
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.
NETW 3005 Mass Storage (How discs work). Notice I was unaware just how much was missing in the printed notes. As a partial remedy for that, the lecture.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 14: Mass-Storage Systems Disk Structure Disk Scheduling Disk Management Swap-Space.
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.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 14: Mass-Storage Systems Disk Structure Disk Scheduling Disk Management Swap-Space.
CMSC 421 Section 0202 I/O Systems Chapter 14: Mass-Storage Structure.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 14: Mass-Storage Systems Disk Structure Disk Scheduling Disk Management Swap-Space.
Chapter 12: Mass-Storage Systems
Operating Systems (CS 340 D) Princess Nora University Faculty of Computer & Information Systems Computer science Department.
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
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 12: Mass-Storage Systems.
CS399 New Beginnings Jonathan Walpole. Disk Technology & Secondary Storage Management.
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.
1 Module 10: Mass-Storage Systems  Reading: Chapter 12  Objectives  Describe the physical structure of secondary storage devices and the resulting effects.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts Essentials – 2 nd Edition Chapter 9: Mass-Storage Systems.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 10: Mass-Storage Systems.
Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Silberschatz, Galvin and Gagne ©2007 Chapter 11: File System Implementation.
Mass Storage Structure
Unit V part 2.
Chapter 10: Mass-Storage Systems
Operating System (013022) Dr. H. Iwidat
Chapter 12: Mass-Storage Structure
Backing Store.
Disk Scheduling Algorithms
Mass-Storage Structure
Chapter 12: Mass-Storage Systems
Operating Systems (CS 340 D)
Overview Continuation from Monday (File system implementation)
Chapter 12: Mass-Storage Structure
Chapter 11: Mass-Storage Systems
Presentation transcript:

Silberschatz, Galvin and Gagne ©2009 Edited by Khoury, 2015 Operating System Concepts – 9 th Edition, Chapter 10: Mass-Storage Structure

10.2 Chapter 10: Mass-Storage Systems Overview of Mass Storage Structure Disk Structure Disk Attachment Disk Scheduling Disk Management Swap-Space Management Operating System Support Performance Issues

10.3 Objectives Describe the physical structure of secondary and tertiary storage devices and the resulting effects on the uses of the devices Explain the performance characteristics of mass-storage devices

10.4 Magnetic Disks Magnetic disks are most common secondary storage of modern computers Both sides of disk platter covered with magnetic material All platters of drive connected to spindle, rotate at 60 to 200 times per second (7200rpm = 120 rotations per second) Read-write head moves just microns above the disks  Head crash: if it touches the disk; sectors (sometimes entire disk) is ruined Arm assembly move all heads of drive along radius of disks

10.5 Magnetic Disks Each platter is divided in concentric tracks Each track divided in sectors A vertical set of tracks among all disks is a cylinder All disks rotate as one by the spindle and all heads move as one by the arm assembly Drive reads one track/sector on the entire cylinder at once

10.6 Magnetic Disks You want to read track t sector s Seek time: time needed to move the head to the desired track Rotational latency: time needed for disk to rotate to desired sector Positioning time (random access time): seek time + rotational latency (several milliseconds) Transfer rate: rate to move data between drive and rest of system (megabytes per second)

10.7 Magnetic Disks Drive attached to computer via I/O bus Commands from rest of computers sent to a host controller, through I/O bus to disk controller built into drive I/O bus transfer much faster than transfer rate: disk controller has cache Data transfers from disk to cache to I/O bus

10.8 Other Mass Storage Devices Punch card Paper cards, each hole is a bit Reading head closes a circuit (through the hole) or not (if no hole) Actually predates computers! Tape drive Large-storage-capacity but slow-access-time magnetic tapes Forward or rewind to desired information ROM Cartridge Portable ROM physically connected to system bus and mapped into system’s memory address space Floppy disk (8-inch, 5¼-inch, 3½-inch, zip) Miniature flexible portable magnetic disks Optical disk (CD, DVD, Blu-Ray) Reflective disks (instead of magnetic): reflection is 1, absorption is 0 Laser read-write head Typically read-only or write-once Solid-state drive (SSD, flash drives) Electronic (transistor and logic gates) storage (instead of magnetic or reflective) No moving parts: random access time in microseconds!

10.9 Disk Structure Disk sectors are of constant data size (normally 512 bytes) But outer tracks are physically larger than inner ones Bit density: number of bits per physical area We want to keep data transfer rate constant Constant linear velocity Keep bit density constant on drive  Result: physically larger tracks hold more sectors Increase speed for inner tracks  Read same number of sectors per unit of time Method used in CDs and DVDs Constant angular velocity Increase bit density for inner tracks  Result: same number of sectors in outer and inner tracks Keep rotation speed constant Method used in HDD

10.10 Disk Scheduling Processes make requests for information on disk OS responsible for using the disk efficiently Maximize bandwidth: amount of data transferred divided by time needed to complete all requests Maximized by handling requests as efficiently as possible Bandwidth has multiple components Positioning time (seek time + rotational latency) Read/write time for the head (constant) Transfer rate (constant) Maximize bandwidth = minimize seek time Seek time  seek distance

10.11 Disk Scheduling Several algorithms exist to schedule the servicing of disk I/O requests We can compare them by using a reference string of requests Requested sectors: 98, 183, 37, 122, 14, 124, 65, 67 Initial read-write head position: 53

10.12 FCFS First-Come-First-Serve: Service each request in the order it arrives Easiest to implement Total seek distance: 640 cylinders

10.13 SSTF Shortest-Seek-Time-First: Select the request with the minimum seek time from the current head position Can cause starvation Total seek distance: 236 cylinders

10.14 SCAN algorithm (elevator algorithm): move the head back and forth from one end of the disk to the other, and service requests as you get to them No chance of starvation Total seek distance: 236 cylinders SCAN

10.15 C-SCAN Circular-SCAN (C-SCAN) algorithm: move the head from one end of the disk to the other, and service requests as you get to them, then jump back to the beginning and start again Total seek distance: 382 cylinders But actually more efficient than SCAN!

10.16 C-LOOK C-LOOK algorithm: variant of C-SCAN that goes to the last request rather than the end and beginning of the disk Total seek distance: 322 cylinders

10.17 Disk Scheduling So which scheduling algorithm is best? Depends on the number and types of requests… and on the file- allocation method! Number of requests Very few requests: SSTF and C-Look reduce to FCFS due to lack of choice, SCAN and C-SCAN are very inefficient Lots of requests: SCAN and C-SCAN more efficient & avoid starvation File-allocation method Contiguous allocation results in lots of nearby requests: FCFS can work Linked or indexed allocation results in scattered requests: FCFS is pretty bad Location of directory entries vs. files FAT: entry at the beginning of disk, file in data region = large disk seek UFS: inode before each file = contiguous requests

10.18 Disk Scheduling Types of requests OS differentiates between read & writes, pages & files Swapping pages given priority over file I/O (especially during page faults) Writing data to files given priority over reading when cache is near full Default choice given no info? Typically SSTF or C-LOOK

10.19 Disk Formatting When a new magnetic disk is built, it’s just a slab of magnetic material Low-level formatting (physical formatting) Dividing a disk into sectors that the disk controller can read and write A sector has A data section (256 to 1024 bytes, typically 512) A header and trailer An error-correcting code (ECC) that allows the controller to automatically detect and correct a few bits wrong Logical formatting Creating the file-system data and structures Marking all sectors as free space

10.20 Bad Blocks All disks have unusable bad blocks IDE disks on MS-DOS Bad blocks detected manually by disk formatting or scanning tools (format and chkdsk) OS writes special value in FAT to make them unusable Information in sector lost SCSI disks: sector forwarding Controller (not OS) handles the bad block list Low-level formatting sets aside spare sectors not visible to OS When a bad sector is found, it is substituted for a spare sector  Information is recovered and copied thanks to ECC SCSI disks: sector slipping Like forwarding, but move all sectors down one spot to keep sector order Sector 17 (bad) and sector 200 (spare), so 199 copied to 200, 198 copied to 199, …, 18 copied to 19, 17 copied to 18

10.21 Swap-Space Management Middle-term schedule swaps information between memory and disk Swap-space size Swap pages to free a few frames (needs several KB to a few MB) Swap entire processes to free lots of memory (needs several GB) Solaris estimates swap space as difference between virtual memory and physical memory, Linux as 2x physical memory space Swap-space location One large file allocated in the file system  Can be expanded just like any file  Need to access through the file system: slower Raw partition managed by OS  Managed for speed rather than efficient storage  Can suffer from fragmentation, but ok because data is short-lived  Expanding it requires repartitioning drive

10.22 Review Given a magnetic disk with multiple platters, each with its own read-write head, is it possible to read sectors on different cylinders on different platters at the same time? How can the file system used on a disk affect our choice of a scheduling algorithm?

10.23 Exercises Skip the following sections: 10.3 (Disk Attachment), 10.7 (RAID Structure), and 10.8 (Stable Storage Implementation) If you have the “with Java” textbook, skip the Java sections and subtract 1 to the following section numbers

Silberschatz, Galvin and Gagne ©2009 Edited by Khoury, 2015 Operating System Concepts – 9 th Edition, End of Chapter 10