Chapter 5 Input/Output 5.1 - 5.3 I/O Hardware I/O Software Software Layers Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights.

Slides:



Advertisements
Similar presentations
Chapter 5 Input/Output 5.1 Principles of I/O hardware
Advertisements

Principles of I/O Hardware I/O Devices Block devices, Character devices, Others Speed Device Controllers Separation of electronic from mechanical components.
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Chapter 3 Memory Management
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 3 Memory Management Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
Avishai Wool lecture Introduction to Systems Programming Lecture 8 Input-Output.
Part 5 (Stallings) Input/Output 5.1 Principles of I/O hardware
1 Input/Output Chapter Principles of I/O hardware 5.2 Principles of I/O software 5.3 I/O software layers 5.4 Disks 5.5 Clocks 5.6 Character-oriented.
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.
1 Pertemuan 18 Input / Output (lanjutan) Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5.
Introduction to Kernel
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.
Chapter 7 Interupts DMA Channels Context Switching.
Chapter 5 Input/Output 5.1 Principles of I/O hardware
Input/Output The messiest part of O.S.
1 Device Management The von Neumann Architecture System Architecture Device Management Polling Interrupts DMA operating systems.
Midterm Tuesday October 23 Covers Chapters 3 through 6 - Buses, Clocks, Timing, Edge Triggering, Level Triggering - Cache Memory Systems - Internal Memory.
CS 342 – Operating Systems Spring 2003 © Ibrahim Korpeoglu Bilkent University1 Input/Output – 3 I/O Software CS 342 – Operating Systems Ibrahim Korpeoglu.
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.
UQC113S2 Interrupt driven IO. We have already seen the hardware support required to facilitate interrupts We will now look at the higher levels of software.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Copyright ©: Nahrstedt, Angrave, Abdelzaher
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
1 Input/Output. 2 Principles of I/O Hardware Some typical device, network, and data base rates.
1 I/O and Filesystems. 2 How to provide interfaces Rough reading guide (no exam guarantee): Tanenbaum Ch. 5.1 – 5.5 & Silberschatz Ch. 13 & ,
Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Silberschatz, Galvin and Gagne ©2007 Chapter 13: I/O Systems.
Cpr E 308 Input/Output Recall: OS must abstract out all the details of specific I/O devices Today –Block and Character Devices –Hardware Issues – Programmed.
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)
CSC 322 Operating Systems Concepts Lecture - 25: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
CS399 New Beginnings Jonathan Walpole. Device Input/Output.
ITEC 502 컴퓨터 시스템 및 실습 Chapter 8-2: I/O Management (Review) Mi-Jung Choi DPNM Lab. Dept. of CSE, POSTECH.
1 Lecture 20: I/O n I/O hardware n I/O structure n communication with controllers n device interrupts n device drivers n streams.
1 Input/Output Chapter Principles of I/O hardware 5.2 Principles of I/O software 5.3 I/O software layers 5.4 Disks.
Windows Operating System Internals - by David A. Solomon and Mark E. Russinovich with Andreas Polze Unit OS6: Device Management 6.1. Principles of I/O.
CS 333 Introduction to Operating Systems Class 15 - Input/Output Jonathan Walpole Computer Science Portland State University.
Introduction to Operating Systems Chapter 1. cs431 -cotter2 Lecture Objectives Understand the relationship between computing hardware, operating system,
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment.
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
Computer Architecture Lecture10: Input/output devices Piotr Bilski.
1 Chapter 2: Computer-System Structures  Computer System Operation  I/O Structure  Storage Structure  Storage Hierarchy  Hardware Protection  General.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
COMPUTER ORGANIZATIONS CSNB123. COMPUTER ORGANIZATIONS CSNB123 Expected Course Outcome #Course OutcomeCoverage 1Explain the concepts that underlie modern.
CENG334 Introduction to Operating Systems Erol Sahin Dept of Computer Eng. Middle East Technical University Ankara, TURKEY URL:
12/8/20151 Operating Systems Design (CS 423) Elsa L Gunter 2112 SC, UIUC Based on slides by Roy Campbell, Sam King,
Chapter 5 Input/Output 5.1 Principles of I/O hardware
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.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Computer Studies (AL) I/O Management. Reference Silberschatz, Galvin, Gagne “Operating System Concepts 6 th edition”, 2003, Wiley Stallings, “Operating.
Input/Output Chapter 5 Tanenbaum & Bo,Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
MINIX Presented by: Clinton Morse, Joseph Paetz, Theresa Sullivan, and Angela Volk.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
Part IVI/O Systems Chapter 13: I/O Systems. I/O Hardware a typical PCI bus structure 2.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
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 Chapter 5 Tanenbaum & Bo,Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Introduction to Operating Systems Concepts
I/O Management.
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Interrupts and signals
Input/Output 1 1.
CS 286 Computer Organization and Architecture
Operating Systems Chapter 5: Input/Output Management
CS703 - Advanced Operating Systems
Chapter 5: I/O Systems.
Computer System Overview
Presentation transcript:

Chapter 5 Input/Output I/O Hardware I/O Software Software Layers Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure 5-1. Some typical device, network, and bus data rates. I/O Devices Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure 5-2. (a) Separate I/O and memory space. (b) Memory-mapped I/O. (c) Hybrid. Memory-Mapped I/O (1) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure 5-3. (a) A single-bus architecture. (b) A dual-bus memory architecture. Memory-Mapped I/O (2) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure 5-4. Operation of a DMA transfer. Direct Memory Access (DMA) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure 5-5. How an interrupt happens. The connections between the devices and the interrupt controller actually use interrupt lines on the bus rather than dedicated wires. Interrupts Revisited Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Properties of a precise interrupt 1. PC (Program Counter) is saved in a known place. 2. All instructions before the one pointed to by the PC have fully executed. 3. No instruction beyond the one pointed to by the PC has been executed. 4. Execution state of the instruction pointed to by the PC is known. Precise and Imprecise Interrupts (1) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure 5-6. (a) A precise interrupt. (b) An imprecise interrupt. Precise and Imprecise Interrupts (2) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure 5-7. Steps in printing a string. Programmed I/O (1) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure 5-8. Writing a string to the printer using programmed I/O. Programmed I/O (2) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure 5-9. Writing a string to the printer using interrupt-driven I/O. (a) Code executed at the time the print system call is made. (b) Interrupt service procedure for the printer. Interrupt-Driven I/O Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Printing a string using DMA. (a) Code executed when the print system call is made. (b) Interrupt service procedure. I/O Using DMA Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Layers of the I/O software system. I/O Software Layers Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Interrupt Handlers (1) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved Save registers not already been saved by interrupt hardware. 2. Set up a context for the interrupt service procedure. 3. Set up a stack for the interrupt service procedure. 4. Acknowledge the interrupt controller. If there is no centralized interrupt controller, reenable interrupts. 5. Copy the registers from where they were saved to the process table.

Interrupt Handlers (2) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved Run the interrupt service procedure. 7. Choose which process to run next. 8. Set up the MMU context for the process to run next. 9. Load the new process’ registers, including its PSW. 10. Start running the new process.

Figure Logical positioning of device drivers. In reality all communication between drivers and device controllers goes over the bus. Device Drivers Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Functions of the device-independent I/O software. Device-Independent I/O Software Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure (a) Without a standard driver interface. (b) With a standard driver interface. Uniform Interfacing for Device Drivers Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure (a) Unbuffered input. (b) Buffering in user space. (c) Buffering in the kernel followed by copying to user space. (d) Double buffering in the kernel. Buffering (1) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Networking may involve many copies of a packet. Buffering (2) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Layers of the I/O system and the main functions of each layer. User-Space I/O Software Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved