 2004 Deitel & Associates, Inc. All rights reserved. Chapter 12 – Disk Performance Optimization Outline 12.1 Introduction 12.2Evolution of Secondary Storage.

Slides:



Advertisements
Similar presentations
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.
Advertisements

Disk Access.
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.
OPERATING SYSTEMS CS3530 Summer 2014 OPERATING SYSTEMS CS3530 Summer 2014 Input/Output System Chapter 9.
REDUNDANT ARRAY OF INEXPENSIVE DISCS RAID. What is RAID ? RAID is an acronym for Redundant Array of Independent Drives (or Disks), also known as Redundant.
1 Storage (cont’d) Disk scheduling Reducing seek time (cont’d) Reducing rotational latency RAIDs.
Lecture 17 I/O Optimization. Disk Organization Tracks: concentric rings around disk surface Sectors: arc of track, minimum unit of transfer Cylinder:
1 Lecture 26: Storage Systems Topics: Storage Systems (Chapter 6), other innovations Final exam stats:  Highest: 95  Mean: 70, Median: 73  Toughest.
Disk Drivers May 10, 2000 Instructor: Gary Kimura.
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.
SECTIONS 13.1 – 13.3 Sanuja Dabade & Eilbroun Benjamin CS 257 – Dr. TY Lin SECONDARY STORAGE MANAGEMENT.
Device Management.
1 Disk Scheduling Chapter 14 Based on the slides supporting the text.
12: IO Systems1 I/O SYSTEMS This Chapter is About Processor I/O Interfaces: Connections exist between processors, memory, and IO devices. The OS must manage.
Disks CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
Secondary Storage CSCI 444/544 Operating Systems Fall 2008.
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
CS 346 – Chapter 10 Mass storage –Advantages? –Disk features –Disk scheduling –Disk formatting –Managing swap space –RAID.
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
RAID: High-Performance, Reliable Secondary Storage Mei Qing & Chaoxia Liao Nov. 20, 2003.
Two or more disks Capacity is the same as the total capacity of the drives in the array No fault tolerance-risk of data loss is proportional to the number.
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.
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.
Chapter 11 I/O Management and Disk Scheduling Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and.
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.
1 I/O Management and Disk Scheduling Chapter Categories of I/O Devices Human readable Used to communicate with the user Printers Video display terminals.
1 IO Management and Disk Scheduling Chapter Categories of I/O Devices n Human readable u used to communicate with the user u video display terminals.
Page 110/12/2015 CSE 30341: Operating Systems Principles Network-Attached Storage  Network-attached storage (NAS) is storage made available over a network.
Disk Access. Seek Algorithms FCFS SSTF SCAN – r/w in (current) preferred direction only –So inward, then outward, etc CSCAN – one way, r/w, then jump.
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.
RAID SECTION (2.3.5) ASHLEY BAILEY SEYEDFARAZ YASROBI GOKUL SHANKAR.
Chapter 12 – Mass Storage Structures (Pgs )
The concept of RAID in Databases By Junaid Ali Siddiqui.
I/O Management and Disk Scheduling Chapter 11. Disk Performance Parameters To read or write, the disk head must be positioned at the desired track and.
Rensselaer Polytechnic Institute CSC 432 – Operating Systems David Goldschmidt, Ph.D.
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.
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.
Part IV I/O System Chapter 12: Mass Storage Structure.
LECTURE 13 I/O. I/O CANNOT BE IGNORED Assume a program requires 100 seconds, 90 seconds for main memory, 10 seconds for I/O. Assume main memory access.
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.
Disks and RAID.
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
Sanuja Dabade & Eilbroun Benjamin CS 257 – Dr. TY Lin
Overview Continuation from Monday (File system implementation)
Disks and scheduling algorithms
Disk Access.
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.
Presentation transcript:

 2004 Deitel & Associates, Inc. All rights reserved. Chapter 12 – Disk Performance Optimization Outline 12.1 Introduction 12.2Evolution of Secondary Storage 12.3Characteristics of Moving-Head Disk Storage 12.4Why Disk Scheduling Is Necessary 12.5Disk Scheduling Strategies First-Come-First-Served (FCFS) Disk Scheduling Shortest-Seek-Time-First (SSTF) Disk Scheduling SCAN Disk Scheduling C-SCAN Disk Scheduling FSCAN and N-Step SCAN Disk Scheduling LOOK and C-LOOK Disk Scheduling 12.6Rotational Optimization SLTF Scheduling SPTF and SATF Scheduling

 2004 Deitel & Associates, Inc. All rights reserved. Chapter 12 – Disk Performance Optimization Outline (cont.) 12.7 System Considerations 12.8Caching and Buffering 12.9Other Disk Performance Techniques 12.10Redundant Arrays of Independent Disks (RAID) RAID Overview Level 0 (Striping) Level 1 (Mirroring) Level 2 (Bit-Level Hamming ECC Parity) Level 3 (Bit-Level XOR ECC Parity) Level 4 (Block-Level XOR ECC Parity) Level 5 (Block-Level Distributed XOR ECC Parity)

 2004 Deitel & Associates, Inc. All rights reserved. Objectives After reading this chapter, you should understand: –how disk input/output is accomplished. –the importance of optimizing disk performance. –seek optimization and rotational optimization. –various disk scheduling strategies. –caching and buffering. –other disk performance improvement techniques. –key schemes for implementing redundant arrays of independent disks (RAID).

 2004 Deitel & Associates, Inc. All rights reserved Characteristics of Moving-Head Disk Storage Physical layout of disk drives –Set of magnetic platters Rotate on spindle Made up of tracks, which in turn contain sectors Vertical sets of tracks form cylinders

 2004 Deitel & Associates, Inc. All rights reserved Characteristics of Moving-Head Disk Storage Performance measurements –Rotational latency Time for data to rotate from current position to read- write head –Seek time Time for read-write head to move to new cylinder –Transmission time Time for all desired data to spin by read-write head

 2004 Deitel & Associates, Inc. All rights reserved Characteristics of Moving-Head Disk Storage Disks divide tracks into several sectors, each typically containing 512 bytes

 2004 Deitel & Associates, Inc. All rights reserved. Figure 12.4 Components of a disk access Why Disk Scheduling Is Necessary

 2004 Deitel & Associates, Inc. All rights reserved Why Disk Scheduling Is Necessary First-come-first-served (FCFS) scheduling has major drawbacks –Seeking to randomly distributed locations results in long waiting times –Under heavy loads, system can become overwhelmed Requests must be serviced in logical order to minimize delays –Service requests with least mechanical motion The first disk scheduling algorithms concentrated on minimizing seek times, the component of disk access that had the highest latency Modern systems perform rotational optimization as well

 2004 Deitel & Associates, Inc. All rights reserved Disk Scheduling Strategies Three criteria to measure strategies –Throughput Number of requests serviced per unit of time –Mean response time Average time spent waiting for request to be serviced –Variance of response times Measure of the predictability of response times Overall goals –Maximize throughput –Minimize response time and variance of response times

 2004 Deitel & Associates, Inc. All rights reserved. Figure 12.5 Disk request pattern Disk Scheduling Strategies

 2004 Deitel & Associates, Inc. All rights reserved First-Come-First-Served (FCFS) Disk Scheduling FCFS scheduling: Requests serviced in order of arrival –Advantages Fair Prevents indefinite postponement Low overhead –Disadvantages Potential for extremely low throughput –FCFS typically results in a random seek pattern because it does not reorder requests to reduce service delays

 2004 Deitel & Associates, Inc. All rights reserved. Figure 12.6 Seek pattern under the FCFS strategy First-Come-First-Served (FCFS) Disk Scheduling

 2004 Deitel & Associates, Inc. All rights reserved Shortest-Seek-Time-First SSTF: Service request closest to read-write head –Advantages Higher throughput and lower response times than FCFS Reasonable solution for batch processing systems –Disadvantages Does not ensure fairness Possibility of indefinite postponement High variance of response times Response time generally unacceptable for interactive systems

 2004 Deitel & Associates, Inc. All rights reserved. Figure 12.7 Seek pattern under the SSTF strategy Shortest-Seek-Time-First

 2004 Deitel & Associates, Inc. All rights reserved SCAN Disk Scheduling SCAN: Shortest seek time in preferred direction –Does not change direction until edge of disk reached –Similar characteristics to SSTF –Indefinite postponement still possible –Offers an improved variance of response times

 2004 Deitel & Associates, Inc. All rights reserved. Figure 12.8 Seek pattern under the SCAN strategy SCAN Disk Scheduling

 2004 Deitel & Associates, Inc. All rights reserved C-SCAN Disk Scheduling C-SCAN: Similar to SCAN, but at the end of an inward sweep, the disk arm jumps (without servicing requests) to the outermost cylinder –Further reduces variance of response times as the expense of throughput and mean response times

 2004 Deitel & Associates, Inc. All rights reserved. Figure 12.9 Seek pattern under the C-SCAN strategy C-SCAN Disk Scheduling

 2004 Deitel & Associates, Inc. All rights reserved Rotational Optimization Seek time formerly dominated performance concerns –Today, seek times and rotational latency are the same order of magnitude Recently developed strategies attempt to optimization disk performance by reducing rotational latency Important when accessing small pieces of data distributed throughout the disk surfaces

 2004 Deitel & Associates, Inc. All rights reserved SLTF Scheduling Shortest-latency-time-first scheduling –On a given cylinder, service request with shortest rotational latency first –Easy to implement –Achieves near-optimal performance for rotational latency

 2004 Deitel & Associates, Inc. All rights reserved SPTF and SATF Scheduling Shortest-positioning-time-first scheduling –Positioning time: Sum of seek time and rotational latency –SPTF first services the request with the shortest positioning time –Yields good performance –Can indefinitely postpone requests

 2004 Deitel & Associates, Inc. All rights reserved SPTF and SATF Scheduling Shortest-access-time-first scheduling –Access time: positioning time plus transmission time –High throughput Again, possible to indefinitely postpone requests Weakness –Both SPTF and SATF require knowledge of disk performance characteristics which might not be readily available due to error- correcting data and transparent reassignment of bad sectors

 2004 Deitel & Associates, Inc. All rights reserved. Figure SPTF (a) and SATF (b) disk scheduling examples SPTF and SATF Scheduling

 2004 Deitel & Associates, Inc. All rights reserved System Considerations Disk scheduling is frequently, but not always, helpful –Will not help appreciably in processor-bound systems –High loads of small transactions to randomly distributed location will benefit –On fairly uniform, nonrandom distributions, scheduling overhead can degrade performance –File organization techniques sometimes counteract scheduling algorithms

 2004 Deitel & Associates, Inc. All rights reserved Caching and Buffering Cache buffer: Store copy of disk data in faster memory –Located in main memory, onboard cache, or on disk controller –Vastly faster access times than access to disk –Can be used as a buffer to delay writing of data until disk is under light load Potential for inconsistency –Contents of main memory could be lost in power outage or system failure –Write-back caching Data not written to disk immediately Flushed periodically –Write-through caching Writes to disk and cache simultaneously Reduces performance compared to write-back, but guarantees consistency

 2004 Deitel & Associates, Inc. All rights reserved Other Disk Performance Techniques Other ways of optimizing disk performance –Defragmentation Place related data in contiguous sectors Decreases number of seek operations required Partitioning can help reduce fragmentation –Compression Data consumes less disk space Improves transfer and access times Increased execution-time overhead to perform compression/decompression

 2004 Deitel & Associates, Inc. All rights reserved Redundant Arrays of Independent Disks Patterson et al. observed that memory and processor speeds tend to increase much faster than disk I/O speeds RAID developed to avoid the “pending I/O” crisis –Attempts to improve disk performance and/or reliability –Multiple disks in an array can be accessed simultaneously –Performs accesses in parallel to increase throughput –Additional drives can be used to improve data integrity

 2004 Deitel & Associates, Inc. All rights reserved RAID Overview Common RAID characteristics –Data stored in strips Spread across set of disks –Strips form stripes Set of strips at same location on each disk –Fine-grained strip Yields high transfer rates (many disks service request at once) Array can only process one request at once –Coarse-grained strips Might fit an entire file on one disk Allow multiple requests to be filled at once

 2004 Deitel & Associates, Inc. All rights reserved. Figure Strips and stripe created from a single file in RAID systems RAID Overview

 2004 Deitel & Associates, Inc. All rights reserved RAID Overview Potential drawbacks –Larger number of disks decreases mean-time-to-failure (MTTF) More disks provide more points of failure Data stored in many RAID levels can be lost if more than one drive in array fails

 2004 Deitel & Associates, Inc. All rights reserved RAID Overview Related technologies –Disk mirroring One disk is simply a copy of another Simple way to achieve redundancy and fault tolerance, but incurs significant storage overhead –RAID controller Special-purpose hardware dedicated to RAID operations Offloads most responsibility from operating system/processor Can be expensive