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

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
Faculty of Information Technology Department of Computer Science Computer Organization Chapter 7 External Memory Mohammad Sharaf.
Magnetic Disk Magnetic disks are the foundation of external memory on virtually all computer systems. A disk is a circular platter constructed of.
I/O Management and Disk Scheduling
RAID Redundant Array of Independent Disks
CS 6560: Operating Systems Design
Raid dr. Patrick De Causmaecker What is RAID Redundant Array of Independent (Inexpensive) Disks A set of disk stations treated as one.
Disk Scheduling Based on the slides supporting the text 1.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Disks and RAID.
Chapter 6 External Memory Disk and RAID (Redundant Arrays of Independent Disks) CS-147 Fall 2010 Jonathan Wang.
Lecture 36: Chapter 6 Today’s topic –RAID 1. RAID Redundant Array of Inexpensive (Independent) Disks –Use multiple smaller disks (c.f. one large disk)
Other Disk Details. 2 Disk Formatting After manufacturing disk has no information –Is stack of platters coated with magnetizable metal oxide Before use,
Lecture 17 I/O Optimization. Disk Organization Tracks: concentric rings around disk surface Sectors: arc of track, minimum unit of transfer Cylinder:
Based on the slides supporting the text
Chapter 12 – Disk Performance Optimization Outline 12.1 Introduction 12.2Evolution of Secondary Storage 12.3Characteristics of Moving-Head Disk Storage.
Disks.
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.
CPSC 231 Secondary storage (D.H.)1 Learning Objectives Understanding disk organization. Sectors, clusters and extents. Fragmentation. Disk access time.
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
RAID Ref: Stallings. Introduction The rate in improvement in secondary storage performance has been considerably less than the rate for processors and.
CS 346 – Chapter 10 Mass storage –Advantages? –Disk features –Disk scheduling –Disk formatting –Managing swap space –RAID.
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.
CSE 321b Computer Organization (2) تنظيم الحاسب (2) 3 rd year, Computer Engineering Winter 2015 Lecture #4 Dr. Hazem Ibrahim Shehata Dept. of Computer.
L/O/G/O External Memory Chapter 3 (C) CS.216 Computer Architecture and Organization.
Disk Access. DISK STRUCTURE Sector: Smallest unit of data transfer from/to disk; 512B 2/4/8 adjacent sectors transferred together: Blocks Read/write heads.
Lecture 9 of Advanced Databases Storage and File Structure (Part II) Instructor: Mr.Ahmed Al Astal.
Topic: Disks – file system devices. Rotational Media Sector Track Cylinder Head Platter Arm Access time = seek time + rotational delay + transfer time.
1 Lecture 8: Secondary-Storage Structure 2 Disk Architecture Cylinder Track SectorDisk head rpm.
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.
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.
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.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 14: Mass-Storage Systems Disk Structure Disk Scheduling Disk Management Swap-Space.
I/O Management and Disk Scheduling Chapter 11. Categories of I/O Devices Human readable Used to communicate with the user  Printers, Display terminals,
1.  Disk Structure Disk Structure  Disk Scheduling Disk Scheduling  FCFS FCFS  SSTF SSTF  SCAN SCAN  C-SCAN C-SCAN  C-LOOK C-LOOK  Selecting a.
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 Systems Disk Structure. Disk Scheduling. RAID.
Disk Scheduling The operating system is responsible for using hardware efficiently — for the disk drives, this means having a fast access time and disk.
1 Chapter 13 Mass-Storage Structure. 2 Disk Structure Disk drives are addressed as large 1- dimensional arrays of logical blocks, where the logical block.
M ASS S TORAGE S TRUCTURES Lecture: Operating System Concepts Lecturer: Pooja Sharma Computer Science Department, Punjabi University, Patiala.
CPSC 231 Secondary storage (D.H.)1 Learning Objectives Understanding disk organization. Sectors, clusters and extents. Fragmentation. Disk access time.
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.
Multiple Platters.
External Memory.
RAID, Programmed I/O, Interrupt Driven I/O, DMA, Operating System
Disks and RAID.
Operating Systems Disk Scheduling A. Frank - P. Weisberg.
Operating System I/O System Monday, August 11, 2008.
Disk Scheduling Algorithms
DISK SCHEDULING FCFS SSTF SCAN/ELEVATOR C-SCAN C-LOOK.
Chapter 14 Based on the slides supporting the text
RAID RAID Mukesh N Tekwani
Disk Scheduling The operating system is responsible for using hardware efficiently — for the disk drives, this means having a fast access time and disk.
Overview Continuation from Monday (File system implementation)
Disks and scheduling algorithms
RAID RAID Mukesh N Tekwani April 23, 2019
Disk Scheduling The operating system is responsible for using hardware efficiently — for the disk drives, this means having a fast access time and disk.
Operating Systems Disk Scheduling A. Frank - P. Weisberg.
Presentation transcript:

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

Disk Structure Three elements: cylinder, track and sector/block. Three types of latency (i.e., delay) Positional or seek delay – mechanical and slowest Rotational delay Transfer delay 2

Average read time = 30 + 16.67/2 + (k/32K)16.67 Computing Disk Latency Track size: 32K = 32,768 bytes Rotation Time: 16.67 msec (millisecond) Average seek time: 30 msec What is the average time to transfer k bytes? Average read time = 30 + 16.67/2 + (k/32K)16.67 average time to move from track to track on average, wait a half turn this is the “length” the disk head must pass to complete a transfer 3

Disk Block Interleaving no interleaving single interleaving double interleaving Cylinder Skew The position of sector/block 0 on each track is offset from the previous one, providing sufficient time for moving the disk head from track to track.

Disk Scheduling Since seeking is time consuming, disk scheduling algorithms try to minimize this latency. The following algorithms will be discussed: First-come, first served (FCFS) Shortest-seek-time-first (SSTF) SCAN and C-SCAN LOOK and C-LOOK Since seeking only involves cylinders, the input to these algorithms are cylinder numbers.

First-Come, First-Served Requests: 11, 1, 36, 16, 34, 9, 12 Service Order: 11, 1, 36, 16, 34, 9, 12

Shortest-Seek-Time-First Requests: 11, 1, 36, 16, 34, 9, 12 Service Order: 11, 12, 9, 16, 1, 34, 36

SCAN Scheduling: 1/2 This algorithm requires one more piece of information: the disk head movement direction, inward or outward. The disk head starts at one end, and move toward the other in the current direction. At the other end, the direction is reversed and service continues. Some authors refer to the SCAN algorithm as the elevator algorithm. However, to some others the elevator algorithm means the LOOK algorithm.

SCAN Scheduling: 2/2 Requests: 11, 1, 36, 16, 34, 9, 12 Total tracks: 50, 0 to 49 Current direction: inward Current head position: 11 9

C-SCAN Scheduling: 1/2 C-SCAN is a variation of SCAN. When the disk head reaches one end, move it back to the other end. Thus, this is simply a wrap-around (i.e., circular). Why is this wrap-around reasonable? As the disk head moves in one direction, new requests may arrive at the other end and requests at the same end may have already been served. Thus, warp-around is sort-of FIFO! The C in C-SCAN means circular. 10

C-SCAN Scheduling: 2/2 Requests: 11, 1, 36, 16, 34, 9, 12 Total number of tracks: 50, 0 to 49 Current direction: inward Current head position: 11 11

LOOK Scheduling: 1/2 With SCAN and C-SCAN, the disk head moves across the full width of the disk. This is very time consuming. In practice, SCAN and C-SCAN are not implemented this way. LOOK: It is a variation of SCAN. The disk head goes as far as the last request and reverses its direction. C-LOOK: It is similar to C-SCAN. The disk head also goes as far as the last request and reverses its direction. 12

LOOK Scheduling: 2/2 Requests: 11, 1, 36, 16, 34, 9, 12 Current direction: inward Current head position1:3 11

C-LOOK Scheduling Requests: 11, 1, 36, 16, 34, 9, 12 Current direction: inward Current head position:1411

RAID Structure: 1/2 RAID: Redundant Arrays of Inexpensive Disks. RAID is a set of physical drives viewed by the operating system as a single logical drive. Data are distributed across the physical drivers of an array. Redundant disk capacity is used to store parity information, which guarantees data recoverability is case of disk failure. RAID has 6 levels, each of which is not necessary an extension of the other. 15

RAID Structure: 2/2 16 (figures on this and subsequent pages taken from William Stallings, Operating Systems, 4th ed)

RAID Level 0 The virtual single disk simulated by RAID is divided up into strips of k sectors each. Consecutive strips are written over the drivers in a round-robin fashion. There is no redundancy. If a single I/O request consists of multiple contiguous strips, then multiple strips can be handled in parallel. 17

RAID Level 1: Mirror Each logical strip is mapped to two separate physical drives so that every drive in the array has a mirror drive that contains the same data. Recovery from a disk failure is simple due to redundancy. A write request involves two parallel disk writes. Problem: Cost is high (doubled)! mirror disks 18

Parallel Access RAID Levels 2 and 3 require the use of parallel access technique. In a parallel access array, all member disks participate in the execution of every I/O and the spindles of the individual drives are synchronized so that each disk head is at the same position on each disk at any given time. Data strips are very small, usually a single byte or word. 19

RAID Level 2: 1/2 An error-correcting code is calculated across corresponding bits on each data and the bits of code are stored in the corresponding bit positions on disks. Example: A 8-bit byte is divided into two 4-bit nibbles. A 3-bit Hamming code is added to form a 7-bit word. This 7-bit Hamming coded word is written to seven disks, one bit per disk. parity bits 20

RAID Level 2: 2/2 Cost is high, although the number of bits needed is less than that of RAID 1 (mirror). The number of redundant disks is O(log2 n), where n is the number of data disks. On a single read, all disks are accessed at the same time. The requested data and the associated error- correcting code are delivered to the controller. If there is an error, the controller reconstructs the data bytes using the error-correcting code. Thus, read access is not slowed. RAID 2 would only be an effective choice in an environment in which many disk errors occur.

RAID Level 3: 1/2 RAID 3 is a simplified version of to RAID 2. It only needs one redundant drive. A single parity bit is computed for each data word and written to a parity drive. Example: The parity bit of bits 1-4 is written to the same position on the parity drive. parity drive

RAID Level 3: 2/2 If one failing drive is known, the parity bit can be used to reconstruct the data word. Because data are striped in very small strips, RAID 3 can achieve very high data transfer rates. Any I/O request involves the parallel transfer of data from all of the data disks. However, only one I/O request can be executed at a time.

RAID Level 4: 1/2 RAID 4 and RAID 5 work with strips rather than individual data words, and do not require synchronized drives. The parity of all strips on the same “row” is written on an parity drive. Example: strips 0, 1, 2 and 3 are exclusive-Ored, resulting in a parity strip. exclusive OR

RAID Level 4: 2/2 If a drive fails, the lost bytes can be reconstructed from the parity drive. If a sector fails, it is necessary to read all drives, including the parity drive, to recover. The load of the parity drive is very heavy.

RAID Level 5 To avoid bottleneck of the parity drive of RAID 4, the parity strips can be distributed uniformly over all drives in a round-robin fashion. However, data recovery from a disk crash is more complex.

RAID Level 6 RAID has two different parity calculations (i.e., dual redundancy), which are stored in separate blocks on different disks. Thus, a RAID 6 array whose user data requires N disks would need N+2 disks.

The End