CS420: Operating Systems. Mass Storage Structure

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

Chapter 10: Mass-Storage Systems

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

EIDE, ATA, SATA, USB,

Overview of Mass Storage Structure

Free Space Management

CS3600 SYSTEMS AND NETWORKS

V. Mass Storage Systems

Chapter 10: Mass-Storage Systems

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

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

Module 13: Secondary-Storage Structure

CS370 Operating Systems

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

Disk Scheduling. Based on the slides supporting the text

Chapter 14: Mass-Storage Systems. Disk Structure

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

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

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

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

Chapter 13: Mass-Storage Systems. Disk Structure

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

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

Chapter 12: Mass-Storage

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

CS370 Operating Systems

Mass-Storage Systems

Chapter 10: Mass-Storage Systems

Mass-Storage Structure

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

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

Chapter 11: Mass-Storage Systems

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

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

OPERATING SYSTEMS CS3502 Spring Input/Output System Chapter 9

Mass-Storage Structure

Disc Allocation and Disc Arm Scheduling?

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

MASS-STORAGE STRUCTURE

Chapter 12: Mass-Storage

Chapter 12: Mass-Storage

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

OPERATING SYSTEMS CS3502 Spring Input/Output System Chapter 9

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

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

Chapter 14: Mass-Storage Systems

Overview of Mass Storage Structure

CS370 Operating Systems

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

I/O Systems and Storage Devices

Module 13: Secondary-Storage

Principles of Operating Systems CS 446/646

EI 338: Computer Systems Engineering (Operating Systems & Computer Architecture)

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

CHAPTER 12 AND 13 - MASS-STORAGE STRUCTURE & I/O- 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

Chapter 12: Mass-Storage Systems

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

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

CS 471 Operating Systems. Yue Cheng. George Mason University Fall 2017

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

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

Silberschatz, et al. Topics based on Chapter 13

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

Introduction to I/O and Disk Management

Tape pictures. CSE 30341: Operating Systems Principles

Introduction to I/O and Disk Management

UNIT 4 Device Management

Chapter 14: Mass-Storage Systems

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

Operating Systems. Operating Systems Professor Sina Meraji U of T

MODULE 4. FILE SYSTEM AND SECONDARY STORAGE

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

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

CSE 153 Design of Operating Systems Fall 2018

CSE 153 Design of Operating Systems

UNIT-7. Overview of Mass Storage Structure

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

STORAGE SYSTEMS. Operating Systems 2015 Spring by Euiseong Seo

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

Lecture 9. I/O Management and Disk Scheduling Algorithms

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

Disk Scheduling COMPSCI 386

Outline. Operating Systems: Devices and I/O p. 1/18

Mass-Storage. ICS332 Operating Systems

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

Block Device Driver. Pradipta De

Hard Disk Drives (HDDs)

CSE Opera+ng System Principles

CSC369 Lecture 9. Larry Zhang, November 16, 2015

u Covered: l Management of CPU & concurrency l Management of main memory & virtual memory u Currently --- Management of I/O devices

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

Access time based on initial head position in disk scheduling

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

Lecture 16: Storage Devices

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

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

Operating Systems. V. Input / Output. Eurecom

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

COS 318: Operating Systems. Storage Devices. Kai Li Computer Science Department Princeton University

Transcription:

Mass Storage Structure James Moscola Department of Physical Sciences York College of Pennsylvania Based on Operating System Concepts, 9th Edition by Silberschatz, Galvin, Gagne

Overview of Mass Storage Structure Magnetic disks provide bulk of secondary storage of modern computers - Drives rotate at 60 to 250 times per second - Transfer rate is rate at which data flows between the drive and the computer - Positioning time (random-access time) consists of: (1) Seek time - time to move disk arm to desired cylinder (2) Rotational Latency - time for desired sector to rotate under the disk head - Head crash results from disk head making contact with the disk surface and typically results in a dead disk Drive attached to computer via I/O bus - Busses vary, including EIDE, ATA, SATA, USB, Fibre Channel, SCSI, SAS, Firewire - Host controller in computer uses bus to talk to disk controller built into drive or storage array 2

Moving-head Disk Mechanism 3

Disk Structure Disk drives are addressed as large 1-dimensional arrays of logical blocks (typically 512 or 4096 bytes), 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 - Logical to physical address should be easy Except for bad sectors Number of sectors per track decreases from outer tracks to inner tracks 4

Magnetic Disks Performance - Effective Transfer Rate real 1 Gb/s (~125 MB/s) - Seek time from 3 ms to 12 ms (9 ms common for desktop drives) - Rotational Latency based on spindle speed 1/(RPM * 60) (From Wikipedia) 5

Disk Scheduling The operating system is responsible for using hardware efficiently for the disk drives, this means having a fast access time and disk bandwidth Want to minimize seek time Disk bandwidth is the total number of bytes transferred, divided by the total time between the first request for service and the completion of the last transfer - Affected by how efficiently data is read from the disk 6

Disk Scheduling (Cont.) Each disk I/O request includes the following: - Access Mode (i.e. read or write) - Disk address for the data transfer - A memory address - Number of sectors to transfer OS maintains queue of requests, per disk or device (remember wait-queues?) Several algorithms exist to schedule the servicing of disk I/O requests - First-Come, First Served (FCFS) scheduling - Shortest-Seek Time First (SSTF) scheduling - SCAN / C-SCAN scheduling - LOOK / C-LOOK scheduling 7

First-Come, First-Served (FCFS) Scheduling Serve I/O requests in the order that they are received - Fair, but poor performance Total head movement of 640 cylinders 8

Shortest-Seek-Time-First (SSTF) Scheduling Selects the request with the minimum seek time from the current head position - May cause starvation of some requests if requests keep coming in close to current location while a request is waiting on the far side of the disk Total head movement of 236 cylinders 9

SCAN Scheduling Disk arm starts at one end of the disk, and moves toward the other end, servicing requests until it gets to the other end of the disk, where the head movement is reversed and servicing continues - Requests at far end of disk may have to wait long time Total head movement of 208 cylinders 10

C-SCAN (circular scan) Scheduling Disk 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, without servicing any requests on the return trip - Provides a more uniform wait time than SCAN Total head movement of 382 cylinders 11

C-LOOK Scheduling Arm only goes as far as the last request in each direction, then reverses direction immediately, without first going all the way to the end of the disk - Eliminates unnecessarily traversing to the edge of the disk before turning around LOOK is a version of SCAN C-LOOK a version of C-SCAN Total head movement of 322 cylinders 12

Selecting a Disk-Scheduling Algorithm Dependent on the system -- performance depends on the number and types of requests - SSTF is common - SCAN and C-SCAN perform better for systems that place a heavy load on disk Less starvation Requests for disk service can be influenced by the file-allocation method - And metadata layout 13

Disk Management Low-level formatting, or physical formatting Dividing a disk into sectors that the disk controller can read and write - Each sector can hold header information, plus data, plus error correction code (ECC) - Usually 512 bytes of data but can be selectable To use a disk to hold files, the operating system still needs to record its own data structures on the disk - Partition the disk into one or more groups of cylinders, each treated as a logical disk - Logical formatting or making a file system - To increase efficiency most file systems group blocks into clusters Disk I/O done in blocks File I/O done in clusters 14