Chapter 11 I/O Management and Disk Scheduling

Similar documents
I/O Management and Disk Scheduling. Chapter 11

Chapter 11. I/O Management and Disk Scheduling

Lecture 9. I/O Management and Disk Scheduling Algorithms

Disk Scheduling. Based on the slides supporting the text

Chapter-6. SUBJECT:- Operating System TOPICS:- I/O Management. Created by : - Sanjay Patel

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

Input/Output Management

OPERATING SYSTEMS CS3502 Spring Input/Output System Chapter 9

Module 13: Secondary-Storage Structure

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

Part IV I/O System Chapter 1 2: 12: Mass S torage Storage Structur Structur Fall 2010

Solaris I/O Management and Disk Scheduling

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

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

Chapter 11. I/O Management and Disk Scheduling

OPERATING SYSTEMS CS3502 Spring Input/Output System Chapter 9

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 10: Mass-Storage Systems

Input/Output. Today. Next. Principles of I/O hardware & software I/O software layers Disks. Protection & Security

Chapter 14: Mass-Storage Systems. Disk Structure

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

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

Operating Systems 2010/2011

CSE 380 Computer Operating Systems

Mass-Storage Structure

Chapter 5 Input/Output

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

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

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

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

CSE380 - Operating Systems. Communicating with Devices

Input Output (IO) Management

Disc Allocation and Disc Arm Scheduling?

I/O Design, I/O Subsystem, I/O-Handler Device Driver, Buffering, Disks, RAID January WT 2008/09

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

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

I/O Handling. ECE 650 Systems Programming & Engineering Duke University, Spring Based on Operating Systems Concepts, Silberschatz Chapter 13

CS3600 SYSTEMS AND NETWORKS

I/O Systems and Storage Devices

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

CSE 4/521 Introduction to Operating Systems. Lecture 27 (Final Exam Review) Summer 2018

Operating Systems, Fall

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

UC Santa Barbara. Operating Systems. Christopher Kruegel Department of Computer Science UC Santa Barbara

Virtual Memory COMPSCI 386

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

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

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

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

Chapter 13: Mass-Storage Systems. Disk Structure

I/O Devices. Chapter 5 Input/Output. Memory-Mapped I/O (2) Memory-Mapped I/O (1) Interrupts Revisited. Direct Memory Access (DMA) 11/26/2013

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

Today: Secondary Storage! Typical Disk Parameters!

QUESTION BANK UNIT I

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

Main Points of the Computer Organization and System Software Module

UNIT 4 Device Management

I/O Hardwares. Some typical device, network, and data base rates

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

Uniprocessor Scheduling

Principles of Operating Systems CS 446/646

Input/Output. Chapter 5: I/O Systems. How fast is I/O hardware? Device controllers. Memory-mapped I/O. How is memory-mapped I/O done?

CS420: Operating Systems. Mass Storage Structure

V. Mass Storage Systems

Chap. 3. Input/Output

CSE 120. Overview. July 27, Day 8 Input/Output. Instructor: Neil Rhodes. Hardware. Hardware. Hardware

CS6401- Operating System QUESTION BANK UNIT-IV

Department of Computer Engineering University of California at Santa Cruz. File Systems. Hai Tao

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

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

Hard Disk Drives (HDDs)

Chapter 9 Uniprocessor Scheduling

Page Replacement Algorithms

Overview of Mass Storage Structure

VIRTUAL MEMORY. Maninder Kaur. 1

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

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

I/O 1. Devices and I/O. key concepts device registers, device drivers, program-controlled I/O, DMA, polling, disk drives, disk head scheduling

Input/Output Systems Prof. James L. Frankel Harvard University

Memory Organization MEMORY ORGANIZATION. Memory Hierarchy. Main Memory. Auxiliary Memory. Associative Memory. Cache Memory.

CS510 Operating System Foundations. Jonathan Walpole

EIDE, ATA, SATA, USB,

Silberschatz, et al. Topics based on Chapter 13

Chapter 4 File Systems. Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

PAGE REPLACEMENT. Operating Systems 2015 Spring by Euiseong Seo

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

Input-Output (I/O) Input - Output. I/O Devices. I/O Devices. I/O Devices. I/O Devices. operating system must control all I/O devices.

Free Space Management

Operating Systems. No. 9 ศร ณย อ นทโกส ม Sarun Intakosum

Module 13: Secondary-Storage

Operating Systems. Operating Systems Professor Sina Meraji U of T

Chapter 14: Mass-Storage Systems

Virtual Memory III. Jo, Heeseung

ECE7995 Caching and Prefetching Techniques in Computer Systems. Lecture 8: Buffer Cache in Main Memory (I)

CMSC 424 Database design Lecture 12 Storage. Mihai Pop

Disks and I/O Hakan Uraz - File Organization 1

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

Chapter 10: Mass-Storage Systems

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

Principles of Operating Systems CS 446/646

Transcription:

Operating Systems: Internals and Design Principles, 6/E William Stallings Chapter 11 I/O Management and Disk Scheduling Patricia Roy Manatee Community College, Venice, FL 2008, Prentice Hall 1

2 Differences in I/O Devices Data rate May be differences of several orders of magnitude between the data transfer rates Unit of transfer Character and Block devices Data may be transferred as a stream of bytes for a terminal or in larger blocks for a disk Data representation Encoding and error-correction schemes Error conditions Different types of errors

3

4 Device Controllers I/O devices have components: mechanical component electronic component The electronic component is the device controller may be able to handle multiple devices Controller's tasks convert serial bit stream to block of bytes perform error correction as necessary communicate with CPU

Performing I/O Programmed I/O Process(or) is busy-waiting for the operation to complete Interrupt-driven I/O I/O command is issued Processor continues executing other instructions Direct Memory Access DMA module controls exchange of data between main memory and the I/O device Processor interrupted only after entire I/O finished 5

6 Programmed I/O Writing a string to the printer using programmed I/O --- busy waiting

Interrupts Revisited 7

Interrupt-Driven I/O Writing a string to the printer using interrupt-driven I/O Code executed when print system call is made Interrupt service procedure 8

9

Direct Memory Access (DMA) 10

DMA Configurations (1) 11

DMA Configurations (2) 12

I/O Using DMA Printing a string using DMA code executed when the print system call is made interrupt service procedure 13

14

15 Operating System Design Issues (1) Efficiency Most I/O devices extremely slow compared to main memory Use of multiprogramming allows for some processes to be waiting on I/O while another process executes I/O cannot keep up with processor speed Swapping is used to bring in additional Ready processes which is an I/O operation

16 Operating System Design Issues (2) Generality Desirable to handle all I/O devices in a uniform manner Hide most of the details of device I/O in lowerlevel routines

I/O Software Layers 17

Device Drivers 18

19 Tasks of Device Drivers Accept abstract requests Check input parameters Translate from abstract to concrete Check if device is in use Issue commands to controller (Block) Check errors Return (error) to caller

Device-Independent I/O Software (a) Without a standard driver interface (b) With a standard driver interface 20

With or without Buffering 21

Single Buffer Operating system assigns a buffer in main memory for an I/O request Input transfers made to buffer Data moved to user space when needed Extra data is moved into the buffer User process can process data while additional data is read in Swapping can occur since input is taking place in system memory, not user memory Operating system keeps track of assignment of system buffers to user processes 22

23 Double Buffer Use two system buffers instead of one A process can transfer data to or from one buffer while the operating system empties or fills the other buffer

24 Circular Buffer More than two buffers are used Each individual buffer is one unit in a circular buffer Used when I/O operation must keep up with process

25 Disk Performance Parameters (1) To read or write, the disk head must be positioned at the desired track and at the beginning of the desired sector Seek time Time it takes to position the head at the desired track Rotational delay or rotational latency Time it takes for the beginning of the sector to reach the head

26 Disk Performance Parameters (2) Access time Sum of seek time and rotational delay The time it takes to get in position to read or write Data transfer occurs as the sector moves under the head

Disk Hardware Physical geometry of a disk with two zones A possible virtual geometry for this disk 27

28 Disk Scheduling Policies Seek time is the reason for differences in performance For a single disk there will be a number of I/O requests If requests are selected randomly, get poor performance

29 Disk Scheduling Policies - FIFO First-in, first-out (FIFO) Process request sequentially Fair to all processes Approaches random scheduling in performance if there are many processes

30 Disk Scheduling Policies - SSTF Shortest Service/Seek Time First Select the disk I/O request that requires the least movement of the disk arm from its current position Always choose the minimum seek time

31 SSF (2) Initial position Pending requests Shortest Seek First (SSF) disk scheduling algorithm

Disk Scheduling Policies - SCAN SCAN or Elevator Arm moves in one direction only, satisfying all outstanding requests until it reaches the last track in that direction Direction is reversed 32

33 Disk Scheduling Policies C-SCAN C-SCAN Restricts scanning to one direction only When the last track has been visited in one direction, the arm is returned to the opposite end of the disk and the scan begins again

34

35 RAID Redundant Array of Independent Disks Set of physical disk drives viewed by the operating system as a single logical drive Data are distributed across the physical drives of an array Redundant disk capacity is used to store parity information

RAID 0 (non-redundant) 36

RAID 1 (mirrored) 37

RAID 2 (Hamming code) 38

RAID 3 (bit-interleaved parity) 39

RAID 4 (block-level parity) 40

41 RAID 5 (block-level distributed parity)

RAID 6 (dual redundancy) 42

43 Disk Cache Buffer in main memory for disk sectors Contains a copy of some of the sectors on the disk

44 Least Recently Used (1) The block that has been in the cache the longest with no reference to it is replaced The cache consists of a stack of blocks Most recently referenced block is on the top of the stack When a block is referenced or brought into the cache, it is placed on the top of the stack

45 Least Recently Used (2) The block on the bottom of the stack is removed when a new block is brought in Blocks don t actually move around in main memory A stack of pointers is used

Least Frequently Used The block that has experienced the fewest references is replaced A counter is associated with each block Counter is incremented each time block accessed Block with smallest count is selected for replacement Some blocks may be referenced many times in a short period of time and the reference count is misleading 46

Frequency-Based Replacement 47