INPUT OUTPUT MANAGEMENT Prepared By: Dr. Vipul Vekariya.

Slides:



Advertisements
Similar presentations
I/O Systems & Mass-Storage Systems
Advertisements

I/O Management and Disk Scheduling
I/O Management and Disk Scheduling
1 Chapter 11 I/O Management and Disk Scheduling Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and.
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
CS 6560: Operating Systems Design
Disk Scheduling Based on the slides supporting the text 1.
Avishai Wool lecture Introduction to Systems Programming Lecture 8 Input-Output.
EEE 435 Principles of Operating Systems Principles and Structure of I/O Software (Modern Operating Systems 5.2 & 5.3) 5/22/20151Dr Alain Beaulieu.
Input/Output Management and Disk Scheduling
Operating Systems Input/Output Devices (Ch , 12.7; , 13.7)
Based on the slides supporting the text
Chapter 1 and 2 Computer System and Operating System Overview
Device Management.
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.
1 Input/Output Chapter 3 TOPICS Principles of I/O hardware Principles of I/O software I/O software layers Disks Clocks Reference: Operating Systems Design.
1 Today I/O Systems Storage. 2 I/O Devices Many different kinds of I/O devices Software that controls them: device drivers.
12.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 12: Mass-Storage Systems.
Copyright ©: Nahrstedt, Angrave, Abdelzaher
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
1 Input/Output. 2 Principles of I/O Hardware Some typical device, network, and data base rates.
Device Management. So far… We have covered CPU and memory management Computing is not interesting without I/Os Device management: the OS component that.
RAID Ref: Stallings. Introduction The rate in improvement in secondary storage performance has been considerably less than the rate for processors and.
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.
Chapter 11 I/O Management and Disk Scheduling Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and.
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.
1 I/O Management and Disk Scheduling Chapter
1 I/O Management and Disk Scheduling Chapter Categories of I/O Devices Human readable  Used to communicate with the user  Printers  Video display.
ITEC 502 컴퓨터 시스템 및 실습 Chapter 8-1: I/O Management Mi-Jung Choi DPNM Lab. Dept. of CSE, POSTECH.
Segmentation & O/S Input/Output Chapter 4 & 5 Tuesday, April 3, 2007.
Sistem Operasi IKH311 Masukan Luaran (Input/Output)
Page 110/12/2015 CSE 30341: Operating Systems Principles Network-Attached Storage  Network-attached storage (NAS) is storage made available over a network.
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.
1 I/O Management and Disk Scheduling Chapter Categories of I/O Devices Human readable –Used to communicate with the user –Printers –Video display.
Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and.
O VERVIEW OF M ASS S TORAGE S TRUCTURE Magnetic disks provide bulk of secondary storage of modern computers Drives rotate at 60 to 250 times per second.
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.
Chapter 5 Input/Output 5.1 Principles of I/O hardware
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 I/O Management and Disk Scheduling Chapter I/O Devices Can be group into three categories: 1.Human readable Used to communicate with the computer.
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.
Chapter 14: Mass-Storage Systems Disk Structure. Disk Scheduling. RAID.
Device Management Mark Stanovich Operating Systems COP 4610.
Chapter 101 I/O Management and Disk Scheduling Chapter 11.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
Part IV I/O System Chapter 12: Mass Storage Structure.
Chapter 11 I/O Management and Disk Scheduling Dave Bremer Otago Polytechnic, NZ ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
1 Chapter 11 I/O Management and Disk Scheduling Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and.
I/O Management.
Multiple Platters.
RAID, Programmed I/O, Interrupt Driven I/O, DMA, Operating System
I/O System Chapter 5 Designed by .VAS.
Operating System I/O System Monday, August 11, 2008.
DISK SCHEDULING FCFS SSTF SCAN/ELEVATOR C-SCAN C-LOOK.
CS703 - Advanced Operating Systems
Chapter 14 Based on the slides supporting the text
RAID RAID Mukesh N Tekwani
Operating Systems Chapter 5: Input/Output Management
Overview Continuation from Monday (File system implementation)
Chapter 11 I/O Management and Disk Scheduling
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:

INPUT OUTPUT MANAGEMENT Prepared By: Dr. Vipul Vekariya

2 I/O M ANAGEMENT  One of the main function of the OS is to control the all the computer’s I/O devices.  It should provide the an interface between the devices and rest of the system that is simple and easy to use.  To the extent possible, the interface should be same for all devices.( device independence)

I/O D EVICES. I/O Devices can be divided in two categories. Block devices : it is store the information in fixed size blocks, each one with its own address. Common block sizes range from 512 bytes to bytes. Disk are the most common block devices. Character devices : it deliver or accept a stream of characters. Printer, network card are character devices.

4 D EVICE C ONTROLLERS 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 make available to main memory

M EMORY -M APPED I/O Each controller has a few register that are used for communicating with CPU. By writing in to register, the OS can command the device to deliver data, accept data, switch itself on or off. By reading this register, the OS can learn what the devices' state is. In addition to the control register, many devices have a data buffer the OS can read or write. The issues arises of how the CPU communicate with the control registers and the device data buffer. 5

I/O T ECHNIQUES When the processor encounters an instruction relating to I/O, it executes that instruction by issuing a command to the appropriate I/O module. Three techniques are possible for I/O operations: Programmed I/O Interrupt-driven I/O Direct memory access (DMA) 6

P ROGRAMMED I/O E XAMPLE Data read in a word at a time Processor remains in status-checking look while reading

I NTERRUPT -D RIVEN I/O Processor issues an I/O command to a module and then goes on to do some other useful work. The I/O module will then interrupt the processor to request service when it is ready to exchange data with the processor.

I NTERRUPT - D RIVEN I/O Eliminates needless waiting But everything passes through processor.

D IRECT M EMORY A CCESS Performed by a separate module on the system When needing to read/write processor issues a command to DMA module with: Whether a read or write is requested The address of the I/O device involved The starting location in memory to read/write The number of words to be read/written

11 D IRECT M EMORY A CCESS (DMA) Operation of a DMA transfer

D IRECT M EMORY A CCESS I/O operation delegated to DMA module Processor only involved when beginning and ending transfer. Much more efficient.

13 P RINCIPLES OF I/O S OFTWARE G OALS OF I/O S OFTWARE Device independence programs can access any I/O device without specifying device in advance · (floppy, hard drive, or CD-ROM) Uniform naming name of a file or device a string or an integer not depending on which machine Error handling handle as close to the hardware as possible

14 I/O S OFTWARE L AYERS Layers of the I/O Software System

D EVICE DRIVERS A device driver simplifies programming by acting as a translator between a hardware device and the applications or operating systems.operating systems When a calling program invokes a routine in the driver, the driver issues commands to the device. Once the device sends data back to the driver, the driver may invoke routines in the original calling program.routine Device driver check the input parameter to see if they are valid. If not error is returned. Driver may check if the device is currently in use or not. It may be necessary to switch the device on or motor before transfer can begin. It may also need to mange its power requirement and log events. 15

16 D EVICE D RIVERS Logical position of device drivers is shown here Communications between drivers and device controllers goes over the bus

RAID Patterson et al. suggested six specific disk organization that could be used to improve disk performance. This idea were quickly adopted by industry and have to a new class of I/O devices called a RAID. Redundant array of independent disks. The basic idea behind RAID is to install a box full of disks next to the computer. Typically a large server, replace the disk controller card with the RAID controller. SCSI is Small Computer System Interface. It is a high speed bus interface that links the CD-ROM drive, Hard disk drive, and numerous other peripherals. 17

RAID RAID is a set of physical disk drives viewed by the operating system as a single logical drives. Data are distributed across the physical drives of an array in a scheme known as stripping. Redundant disk capacity is used to store parity information, which guarantees data recoverability in case of a disk failure. 18

RAID 0 A RAID 0 (also known as a stripe set or striped volume ) splits data evenly across two or more disks (striped)striped It is important to note that RAID 0 was not one of the original RAID levels and provides no data redundancy.data redundancy RAID 0 is normally used to increase performance, 19

RAID 1 A RAID 1 creates an exact copy (or mirror ) of a set of data on two or more disks. This is useful when read performance or reliability are more important than data storage capacity.capacity Such an array can only be as big as the smallest member disk. A classic RAID 1 mirrored pair contains two disks (see diagram), which increases reliability geometrically over a single disk. geometrically Since each member contains a complete copy of the data, and can be addressed independently, ordinary wear-and-tear reliability is raised by the power of the number of self-contained copies. 20

RAID 2 A RAID 2 stripes data at the bit (rather than block) level, and uses a Hamming code for error correction.bitHamming codeerror correction RAID level 2 and 3 make use of parallel access technique. In parallel access, all member disks participate in the execution of every I/O request. Spindle of individual drives are synchronize so each disk head in the same position on each disk at any given time. Extremely high data transfer rates are possible. This is the only original level of RAID that is not currently used. 21

RAID 3 It is simplified version of RAID 2. A RAID 3 uses byte-level striping with a dedicated parity diskbyte Here single parity bit is computed for each data word and written to parity drive. 22

RAID LEVEL 4 A RAID 4 uses block-level striping with a dedicated parity disk.block Independent access technique, each member disk operate independently This allows each member of the set to act independently when only a single block is requested. If the disk controller allows it, a RAID 4 set can service multiple read requests simultaneously. 23

RAID LEVEL 5 A RAID 5 uses block-level striping with parity data distributed across all member disks.block RAID 5 has achieved popularity because of its low cost of redundancy. 24

D ISK P ERFORMANCE P ARAMETERS Access Time is the sum of: Seek time: The time it takes to position the head at the desired track Rotational delay or rotational latency: The time its takes for the beginning of the sector to reach the head Transfer Time is the time taken to transfer the data.

D ISK S CHEDULING A LGORITHM To compare various schemes, consider a disk head is initially located at track 100. assume a disk with 200 tracks and that the disk request queue has random requests in it. The requested tracks, in the order received by the disk scheduler, are 55, 58, 39, 18, 90, 160, 150, 38, 184.

F IRST - IN, FIRST - OUT (FIFO) Process request sequentially Fair to all processes Approaches random scheduling in performance if there are many processes

S HORTEST S ERVICE T IME F IRST (SSTF) 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

SCAN ( E LEVATOR ALGORITHM ) Arm moves in one direction only, satisfying all outstanding requests until it reaches the last track in that direction then the direction is reversed

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

P ERFORMANCE C OMPARED Comparison of Disk Scheduling Algorithms