I/O Systems Chapter 15 11/7/2018 Crowley OS Chap. 15.

Slides:



Advertisements
Similar presentations
Chapter 6 I/O Systems.
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.
Device Management Ankur Saggar Nitin Golait Jason Foos Adam Estabrook.
Input/Output Management and Disk Scheduling
Lecture 17 I/O Optimization. Disk Organization Tracks: concentric rings around disk surface Sectors: arc of track, minimum unit of transfer Cylinder:
Disk Drivers May 10, 2000 Instructor: Gary Kimura.
Slide 5-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 5.
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.
Introduction to Database Systems 1 The Storage Hierarchy and Magnetic Disks Storage Technology: Topic 1.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 12: Mass-Storage Systems.
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
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
CSC 322 Operating Systems Concepts Lecture - 25: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
I/O Management and Disk Structure Introduction to Operating Systems: Module 14.
Slide 5-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 5.
Lecture 3 Page 1 CS 111 Online Disk Drives An especially important and complex form of I/O device Still the primary method of providing stable storage.
I/O Management and Disk Scheduling. I/O Hardware Incredible variety of I/O devices Common concepts Port (a connection point) Bus (daisy chain or shared.
Chapter 5 Input/Output 5.1 Principles of I/O hardware
Operating Systems (CS 340 D) Princess Nora University Faculty of Computer & Information Systems Computer science Department.
© 2004, D. J. Foreman 1 Device Mgmt. © 2004, D. J. Foreman 2 Device Management Organization  Multiple layers ■ Application ■ Operating System ■ Driver.
Fall 2000M.B. Ibáñez Lecture 26 I/O Systems II. Fall 2000M.B. Ibáñez Application I/O Interface I/O system calls encapsulate device behaviors in generic.
Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357.
Part IVI/O Systems Chapter 13: I/O Systems. I/O Hardware a typical PCI bus structure 2.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 10: Mass-Storage Systems.
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.
Input/Output (I/O) Important OS function – control I/O
Chapter 10: Mass-Storage Systems
Operating System (013022) Dr. H. Iwidat
Module 12: I/O Systems I/O hardware Application I/O Interface
Chapter 13: I/O Systems Modified by Dr. Neerja Mhaskar for CS 3SH3.
Sarah Diesburg Operating Systems CS 3430
Input/Output Devices ENCE 360
Chapter 12: File System Implementation
I/O System Chapter 5 Designed by .VAS.
Operating Systems Disk Scheduling A. Frank - P. Weisberg.
OPERATING SYSTEMS CS 3502 Fall 2017
Input/Output.
Chapter 12: Mass-Storage Structure
Secondary Storage Secondary storage typically: Characteristics:
I/O Resource Management: Software
Operating System I/O System Monday, August 11, 2008.
Mass-Storage Structure
I/O Devices Chapter 14 9/20/2018 Crowley OS Chap. 14.
Chapter 12: Mass-Storage Systems
Design IV Chapter 18 11/14/2018 Crowley OS Chap. 18.
Operating Systems (CS 340 D)
Operating Systems Chapter 5: Input/Output Management
Operating System Concepts
13: I/O Systems I/O hardwared Application I/O Interface
CS703 - Advanced Operating Systems
CSE 451: Operating Systems Autumn 2003 Lecture 12 Secondary Storage
Secondary Storage Management Brian Bershad
Persistence: hard disk drive
CSE 451: Operating Systems Winter 2003 Lecture 12 Secondary Storage
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Outline Device Management Device Manager Design Buffering
Disks and Storage Systems
Chapter 12: Mass-Storage Structure
Secondary Storage Management Hank Levy
CSE451 File System Introduction and Disk Drivers Autumn 2002
CSE 451: Operating Systems Autumn 2004 Secondary Storage
Device Mgmt © 2004, D. J. Foreman.
Device Mgmt © 2004, D. J. Foreman.
Module 12: I/O Systems I/O hardwared Application I/O Interface
Andy Wang Operating Systems COP 4610 / CGS 5765
Chapter 5 Input/Output Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved
Operating Systems Disk Scheduling A. Frank - P. Weisberg.
Presentation transcript:

I/O Systems Chapter 15 11/7/2018 Crowley OS Chap. 15

Key concepts in chapter 15 Device drivers character and block interfaces Double buffering Disk head scheduling batching and aging as solutions to starvation disk models Generalized device drivers disk parititions, RAM disks, pseudo-ttys, etc. Disk caching 11/7/2018 Crowley OS Chap. 15

I/O system architecture Devices controllers connect to the bus and represent the devices Device drivers talk to device controllers and through them to the devices Device drivers present a common interface to the rest of the OS 11/7/2018 Crowley OS Chap. 15

Device drivers 11/7/2018 Crowley OS Chap. 15

Device driver interface Open(int deviceNumber): controllers can control more than one device Close(int deviceNumber) Read(int deviceNumber, int deviceAddress, void * memoryAddress, int length) Write(int deviceNumber, int deviceAddress, void * memoryAddress, int length) 11/7/2018 Crowley OS Chap. 15

Device driver types Block or disk device drivers disks have fixed-size, addressable blocks so no length is required, it is always one block Character device drivers these devices deliver a stream of data with no addresses, no no device address is used these devices need a “device control” command to handle detailed points (like which paper tray to use) 11/7/2018 Crowley OS Chap. 15

Device control commands Device control rather than data transfer Examples which paper tray to use in a printer rewind a tape turn of echoing on a terminal ring the bell on a terminal 11/7/2018 Crowley OS Chap. 15

Single and double buffering 11/7/2018 Crowley OS Chap. 15

Double buffering flow of control 11/7/2018 Crowley OS Chap. 15

Disk head scheduling If we have two or more pending disk requests, which should go first? Strategies First-come, first-served (FCFS) Shortest-seek-time-first (SSTF) this has problems with starvation that can be solved with aging or batching Elevator algorithm 11/7/2018 Crowley OS Chap. 15

Elevator algorithm 1. Start at cylinder 0 with direction “up”. 2. Let N be the current cylinder. 3. If direction is “up”, then choose the closest request for cylinder N or higher else (direction is “down”) choose the closest request for cylinder N or lower. 4. If there are no request in the direction you are going, then switch directions. 5. Go back to step 2. 11/7/2018 Crowley OS Chap. 15

Device numbers The main use of device numbers is to name which device to use (among those controlled by a single controller) But they are often used to convey other information, for example: device 0 rewinds when done, device 8 does not device 0 uses normal-sized paper, device 8 uses legal-sized paper device 0 writes at high density, device 1 at medium density and device 2 at low density 11/7/2018 Crowley OS Chap. 15

Unification of files and devices The device driver interface is nearly the same as the file interface The I/O system has code to translate from the file interface to the device driver interface, so file commands can be used on devices 11/7/2018 Crowley OS Chap. 15

File, block, and character interfaces 11/7/2018 Crowley OS Chap. 15

Generalized device drivers Device drivers can create useful effects they can partition a physical disk into several logical disks (usually called partitions) they can combine several physical disks into a single logical disk they can use RAM to simulate a (very fast) disk they can allow you to read an address space by making it look like a disk they can pretend they are talking to a terminal when they are really talking to a program 11/7/2018 Crowley OS Chap. 15

Partitioning a disk 11/7/2018 Crowley OS Chap. 15

Combining disks 11/7/2018 Crowley OS Chap. 15

RAM disk 11/7/2018 Crowley OS Chap. 15

Physical memory as a disk 11/7/2018 Crowley OS Chap. 15

A program simulating a terminal 11/7/2018 Crowley OS Chap. 15

Disk caching Memory is about 50,000 times faster than disk, that is the reason for RAM disks But we can selectively keep parts of the disk in a memory buffer (a disk cache) locality makes this work very well Disk caching is very effective we rarely need to read data twice in modern OSs but disk caching is not effective for writes 11/7/2018 Crowley OS Chap. 15

Disk caching flow of control 11/7/2018 Crowley OS Chap. 15

Two-level device driver 11/7/2018 Crowley OS Chap. 15

SCSI device drivers 11/7/2018 Crowley OS Chap. 15