Hardware Definitions –Port: Point of connection –Bus: Interface Daisy Chain (A=>B=>…=>X) Shared Direct Device Access –Controller: Device Electronics –Registers:

Slides:



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

Chapter 13: I/O Systems I/O Hardware Application I/O Interface
I/O and Networking Fred Kuhns
I/O Systems Operating System Concepts chapter 13 CS 355
I/O Systems.
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 13: I/O Systems I/O Hardware Application I/O Interface.
04/14/2008CSCI 315 Operating Systems Design1 I/O Systems Notice: The slides for this lecture have been largely based on those accompanying the textbook.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem.
Chapter 13: I/O Systems- 6th ed
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 2, 2005 Chapter 13: I/O Systems I/O Hardware.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 13: I/O Systems.
I/O Hardware n Incredible variety of I/O devices n Common concepts: – Port – connection point to the computer – Bus (daisy chain or shared direct access)
04/16/2010CSCI 315 Operating Systems Design1 I/O Systems Notice: The slides for this lecture have been largely based on those accompanying an earlier edition.
I/O Systems CS 3100 I/O Hardware1. I/O Hardware Incredible variety of I/O devices Common concepts ◦Port ◦Bus (daisy chain or shared direct access) ◦Controller.
Chapter 13 Input/Output (I/O) Systems
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
1 Today I/O Systems Storage. 2 I/O Devices Many different kinds of I/O devices Software that controls them: device drivers.
I/O Systems CSCI 444/544 Operating Systems Fall 2008.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
CHAPTER 13: I/O SYSTEMS Overview Overview I/O Hardware I/O Hardware I/O API I/O API I/O Subsystem I/O Subsystem Transforming I/O Requests to Hardware Operations.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 13+14: I/O Systems and Mass- Storage Structure I/O Hardware Application I/O.
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 2, 2005 Chapter 13: I/O Systems I/O Hardware.
Operating Systems CMPSC 473 I/O Management (1) November Lecture 23 Instructor: Bhuvan Urgaonkar.
Silberschatz, Galvin and Gagne  Operating System Concepts I/O Hardware Incredible variety of I/O devices.
ITEC 502 컴퓨터 시스템 및 실습 Chapter 8-2: I/O Management (Review) Mi-Jung Choi DPNM Lab. Dept. of CSE, POSTECH.
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne ©2005 AE4B33OSS Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O.
I/O Systems I/O Hardware Application I/O Interface
1 Module 12: I/O Systems n I/O hardware n Application I/O Interface n Kernel I/O Subsystem n Transforming I/O Requests to Hardware Operations n Performance.
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 13: I/O Systems.
Cosc 4740 Chapter 12 I/O Systems. I/O Hardware Incredible variety of I/O devices –Storage –Transmission –Human-interface.
Chapter 13: I/O Systems. 13.2/34 Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware.
I/O Management Chapter 8.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem.
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne ©2005 Operating System Principles Chapter 13: I/O Systems I/O Hardware Application I/O Interface.
Chapter 13 – I/O Systems (Pgs ). Devices  Two conflicting properties A. Growing uniformity in interfaces (both h/w and s/w): e.g., USB, TWAIN.
Silberschatz, Galvin and Gagne  Operating System Concepts Six Step Process to Perform DMA Transfer.
XE33OSA Chapter 13: I/O Systems. 13.2XE33OSA Silberschatz, Galvin and Gagne ©2005 Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel.
CENG334 Introduction to Operating Systems Erol Sahin Dept of Computer Eng. Middle East Technical University Ankara, TURKEY URL:
I/O Management.
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 2, 2005 Chapter 13: I/O Systems I/O Hardware.
Silberschatz, Galvin and Gagne ©2009 Edited by Khoury, 2015 Operating System Concepts – 9 th Edition, Chapter 13: I/O Systems.
1 Chapter 13 Input/Output (I/O) Systems Dr. İbrahim Körpeoğlu Bilkent University Department of Computer Engineering.
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 13: I/O Systems Overview I/O Hardware Application.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 13: I/O Systems.
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 2, 2005 I/O through system calls Protection.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 13: I/O Systems.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 12: I/O Systems I/O hardwared Application I/O Interface Kernel I/O.
CMSC 421 Section 0202 I/O Systems Chapter 13: I/O Systems.
FILE SYSTEM IMPLEMENTATION 1. 2 File-System Structure File structure Logical storage unit Collection of related information File system resides on secondary.
Module 11: I/O Systems Reading: Chapter 13 Objectives  Explore the structure of the operating system’s I/O subsystem.  Discuss the principles of I/O.
Chapter 13: I/O Systems.
Lecture 13 Input/Output (I/O) Systems (chapter 13)
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.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Operating System I/O System Monday, August 11, 2008.
Chapter 13: I/O Systems.
CSCI 315 Operating Systems Design
I/O Systems.
I/O Systems I/O Hardware Application I/O Interface
Operating System Concepts
13: I/O Systems I/O hardwared Application I/O Interface
Selecting a Disk-Scheduling Algorithm
CS703 - Advanced Operating Systems
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Chapter 13: I/O Systems.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Operating Systems I/O System Alok Kumar Jagadev.
Module 12: I/O Systems I/O hardwared Application I/O Interface
Presentation transcript:

Hardware Definitions –Port: Point of connection –Bus: Interface Daisy Chain (A=>B=>…=>X) Shared Direct Device Access –Controller: Device Electronics –Registers: Device Storage for CPU to device communication –Handshakes: signals sent between devices and the CPU through shared memory or privileged I/O instructions Issue (many devices & manufactures) Solutions –Standard interfaces –Uniform drivers for device groups –Manufacturer provided drivers Device addresses for automatic probes

CPU Device Control Privileged I/O instructions control devices –Interface with device command-ready, busy, and error status registers Direct memory I/O instructions –Ties devices to memory locations Memory-mapped I/O –Reserved memory addresses control a device (E.g.: monitor display) Simple Polling interface –Useful if device response is almost instantaneous (busy-wait) WHILE command-ready-register = device-not-ready THEN spin Issue send or receive command WHILE device is busy THEN spin (This is a busy wait loop) IF error and retry-count not expired THEN restart the command RETURN I/O complete

Programmed IO I/O raises the CPU Interrupt request line At next instruction, the Interrupt occurs, and the CPU state saved The Interrupt vector directs interrupts to the correct handler –Interrupt chaining ties multiple devices to a single vector entry –Some interrupts can be masked based on priority Traps are software triggered interrupts

Direct Memory Access (DMA) Used to avoid programmed I/O for large data transfers from fast devices Requires a DMA controller enabling devices to directly access memory CPU cycles are stolen for each memory reference The driver gives the DMA controller chains of addresses and lengths

I/O Sub-system Note: Some specialized devices have unique interfaces and drivers Purpose: Abstract, Encapsulate, and Layer Device-drivers: Encapsulate controller differences from kernel Device Categories I/O Subsystem Structure

Device Categories by Speed

Kernel Data Structures Kernel maintains system-wide I/O components table Kernel maintains free, used, “dirty” buffers in complex data structures I/O Wait queues and cache buffering

Device-status Table

Application API Block devices include disk drives –Commands include read, write, seek –Raw I/O or file-system access –Memory-mapped byte streams using virtual memory facilities Character devices (keyboards, mice, serial ports) –Commands include get, put –Libraries layered on top allow line editing (backspace etc.) Network devices –Incorporates protocol, flow control, and pipelining –Separates network protocol from network operation –Includes select functionality (socket port numbers) Clocks and Timers for current time and elapsed time –Course grain regular interval interrupts –Programmable non-interruptible timers for fine grain resolution

System Call to Perform I/O

Categories of OS calls Blocking - process suspended until I/O completed –Easy to use and understand –Insufficient for some needs Non-blocking - I/O call returns as much as available –User interface, data copy (OS buffered I/O) –Implemented via multi-threading –Returns quickly with count of bytes read or written Asynchronous - process runs while I/O executes –Difficult to use –I/O subsystem signals process when I/O completed Direct Application control –ioctl (on UNIX) allows applications to directly control devices –Driver testing

Additional OS I/O Subsystem Services Caching - fast memory access to recently accessed data –Always just a copy –Significant performance impact Spooling - hold output for a device –If device can serve only one request at a time –i.e., Printing Exclusive device reservation –System calls for allocation and de-allocation –Deadlocks are possible Scheduling - Ordering the I/O requests in the per-device queue –Some OSs try fairness Buffering - store data in OS buffers during transfers –To cope with device speed or transfer size mismatches –To maintain “copy semantics”, and dirty buffers. Fault processing : Recovery through retry operations, error logs Miscellaneous : Pipes, FIFOs, packet handling, streams, queues, mailboxes

Flow of an I/O Request Consider request to read a file –What device? –Name translation –Copy between application and kernel buffer –Change process status to ready

Streams STREAM – flow from source to sink (process device) –Full-duplex: flow in both directions –Stream head interfaces with the user process –Stream tail interfaces with the device –Stream wrappers enable data manipulation (filtering) at each level, which contain their own read/write queuing capabilities Implementation –Message passing between adjacent queues –Multiple copies operations will increase overhead

Performance Potential bottlenecks: –CPU device processing –Context switches after processing interrupts –Copying between OS and user buffers –Routing network traffic Performance improvements –Reduce context switches –Minimize data copying –Minimize interrupts and reduce latency by using large transfers, smart controllers, DMA –Balance CPU, memory, bus, and I/O contention for highest throughput I/O System flow illustrating bottlenecks

Incorporate of new Devices Where should the device handling code go?