CHAPTER 9: Input / Output

Slides:



Advertisements
Similar presentations
Chapter 14 The User View of Operating Systems
Advertisements

SUPPLEMENTARY CHAPTER 2 Instruction Addressing Modes
CS-334: Computer Architecture
FIU Chapter 7: Input/Output Jerome Crooks Panyawat Chiamprasert
Chapter 9: Input/Output The Architecture of Computer Hardware and Systems Software: An Information Technology Approach 3rd Edition, Irv Englander John.
ACCOUNTING INFORMATION SYSTEMS
CHAPTER 4: Representing Integer Data The Architecture of Computer Hardware and Systems Software: An Information Technology Approach 3rd Edition, Irv Englander.
Chapter 12 Three System Examples The Architecture of Computer Hardware and Systems Software: An Information Technology Approach 3rd Edition, Irv Englander.
Chapter 15 – Part 2 Networks The Internal Operating System The Architecture of Computer Hardware and Systems Software: An Information Technology Approach.
CHAPTER 2: Number Systems
Chapter 7 Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats.
SUPLEMENTARY CHAPTER 1: An Introduction to Digital Logic The Architecture of Computer Hardware and Systems Software: An Information Technology Approach.
CHAPTER 8: CPU and Memory Design, Enhancement, and Implementation
CHAPTER 9: Input / Output
CHAPTER 2: Introduction to Systems Concepts and Systems Architecture
External Devices I/O Modules Programmed I/O Interrupt Driven I/O Direct Memory Access I/O Channels and Processors.
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
Chapter 7 Input/Output Luisa Botero Santiago Del Portillo Ivan Vega.
Chapter 8 Input/Output. Busses l Group of electrical conductors suitable for carrying computer signals from one location to another l Each conductor in.
CHAPTER 11: Modern Computer Systems
Chapter 10: Input / Output Devices Dr Mohamed Menacer Taibah University
CHAPTER 8: CPU and Memory Design, Enhancement, and Implementation
Interrupts Signal that causes the CPU to alter its normal flow on instruction execution ◦ frees CPU from waiting for events ◦ provides control for external.
1 Computer System Overview Chapter 1. 2 n An Operating System makes the computing power available to users by controlling the hardware n Let us review.
CHAPTER 11: Modern Computer Systems
MICROPROCESSOR INPUT/OUTPUT
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.
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
Computer Architecture Lecture10: Input/output devices Piotr Bilski.
Computers Internal Communication. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.
CHAPTER 3: Number Systems
2009 Sep 10SYSC Dept. Systems and Computer Engineering, Carleton University F09. SYSC2001-Ch7.ppt 1 Chapter 7 Input/Output 7.1 External Devices 7.2.
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CE-321: Computer.
CHAPTER 6: The Little Man Computer
CHAPTER 3: Number Systems The Architecture of Computer Hardware and Systems Software & Networking: An Information Technology Approach 4th Edition, Irv.
Copyright © 2000 John Wiley & Sons, Inc. All rights reserved
Slide 1-1 Chapter 1 Terms Information Systems Overview Introduction to Information Systems Judith C. Simon.
Copyright © 2000 John Wiley & Sons, Inc. All rights reserved. Reproduction or translation of this work beyond that permitted in Section 117 of the 1976.
CH10 Input/Output DDDData Transfer EEEExternal Devices IIII/O Modules PPPProgrammed I/O IIIInterrupt-Driven I/O DDDDirect Memory.
L/O/G/O Input Output Chapter 4 CS.216 Computer Architecture and Organization.
Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower than CPU.
IT3002 Computer Architecture
CHAPTER 3: Number Systems
Input Output Techniques Programmed Interrupt driven Direct Memory Access (DMA)
Slide 6-1 Chapter 6 System Software Considerations Introduction to Information Systems Judith C. Simon.
بسم الله الرحمن الرحيم MEMORY AND I/O.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
Slide 6-1 Chapter 6 Terms System Software Considerations Introduction to Information Systems Judith C. Simon.
“Copyright © 2001 John Wiley & Sons, Inc. All rights reserved. Reproduction or translation of this work beyond that permitted in Section 117 of the 1976.
Input / Output Chapter 9.
CHAPTER 11: Modern Computer Systems
CHAPTER 6: The Little Man Computer
CHAPTER 9: Input / Output
CHAPTER 9: Input / Output
CHAPTER 8: CPU and Memory Design, Enhancement, and Implementation
Computer System Overview
CHAPTER 6: The Little Man Computer
CHAPTER 8: CPU and Memory Design, Enhancement, and Implementation
BIC 10503: COMPUTER ARCHITECTURE
Chapter 15 – Part 2 Networks The Internal Operating System
Computer System Overview
Chapter 14 The User View of Operating Systems
Presentation transcript:

CHAPTER 9: Input / Output The Architecture of Computer Hardware, Systems Software & Networking: An Information Technology Approach 4th Edition, Irv Englander John Wiley and Sons 2010 PowerPoint slides authored by Wilson Wong, Bentley University PowerPoint slides for the 3rd edition were co-authored with Lynne Senne, Bentley College

Basic Model Input Process Output Processing speed or program execution determined primarily by ability of I/O operations to stay ahead of processor. Input Process Output Copyright 2010 John Wiley & Sons, Inc.

I/O Requirements Means for addressing different peripheral devices A way for peripheral devices to initiate communication with the CPU An efficient means of transferring data directly between I/O and memory for large data transfers since programmed I/O is suitable only for slow devices and individual word transfers Buses that interconnect high-speed I/O devices with the computer must support high data transfer rates Means for handling devices with extremely different control requirements Copyright 2010 John Wiley & Sons, Inc.

I/O Interfaces Are necessary because of Different formats required by the devices Incompatibilities in speed between the devices and the CPU make synchronization difficult Bursts of data vs. streaming data Device control requirements that would tie up too much CPU time Copyright 2010 John Wiley & Sons, Inc.

Examples of I/O Devices Copyright 2010 John Wiley & Sons, Inc.

Simple I/O Configuration Copyright 2010 John Wiley & Sons, Inc.

More Complex I/O Module Copyright 2010 John Wiley & Sons, Inc.

Advanced I/O Techniques Programmed I/O CPU controlled I/O Interrupt Driven I/O External input controls Direct Memory Access Controllers Method for transferring data between main memory and a device that bypasses the CPU I/O Modules - responsible for the control of one or more external devices and for the exchange of data between those devices and MM or CPU registers; the I/O module must have an interface internal to the computer and external to the computer; Programmed I/O - data are exchanged between the CPU and the I/O module, CPU has direct control of the I/O operation, when the CPU issues a command to the I/O module it must wait until the I/O operation is complete; Interrupt driven I/O - the CPU issues a command and then continues to execute other instructions and the I/Omodule issues an interrupt when it completes its task - Intel 8255A Programmable Peripheral Interface(single chip, gp I/O module designed for use with the Intel 8086 Direct Memory Access - the I/O module and main memory exchange data directly without CPU involvement; common on Network Boards, CD ROMs, sound boards, floppy drives, whenever large amounts of data are read/written DMA channels only on ISA bus (not PCI bus) Copyright 2010 John Wiley & Sons, Inc.

Programmed I/O I/O data and address registers in CPU One word transfer per I/O instruction Address information for each I/O device LMC I/O capability for 100 devices Full instruction fetch/execute cycle Primary use: keyboards communication with I/O modules (see DMA) Copyright 2010 John Wiley & Sons, Inc.

Programmed I/O Example Copyright 2010 John Wiley & Sons, Inc.

Programmed I/O Example Copyright 2010 John Wiley & Sons, Inc.

Interrupts Signal that causes the CPU to alter its normal flow of instruction execution frees CPU from waiting for events provides control for external I/O initiation Examples unexpected input abnormal situation illegal instructions multitasking, multiprocessing Copyright 2010 John Wiley & Sons, Inc.

Interrupt Terminology Interrupt lines (hardware) One or more special control lines to the CPU Interrupt request Interrupt handlers Program that services the interrupt Also known as an interrupt routine or device driver Context Saved registers of a program before control is transferred to the interrupt handler Allows program to resume exactly where it left off when control returns to interrupted program Pcs generally have 8 or 15 interrupt lines (IRQ1 …. IRQx) In the interrupt cycle the CPU checks to see if any interrupts have occurred, indicated by the presence of an interrupt signal If an interrupt has occurred the CPU 1) saves the context of the current program being executed. 2) sets the PC to the starting address of an interrupt handler program, The CPU then proceeds to the fetch portion of the instruction cycle and fetches the first instruction in the interrupt handler Disabled interrupts - the CPU will ignore interrupt signals ex. when currently executing one interrupt it will ignore any others, Copyright 2010 John Wiley & Sons, Inc.

Use of Interrupts Notify that an external event has occurred real-time or time-sensitive Signal completion printer ready or buffer full Allocate CPU time time sharing Indicate abnormal event (CPU originates for notification and recovery) illegal operation, hardware error Software interrupts External event notifier - frees CPU from polling, a means for the user to control the computer from an input device, Completion signal - means of controlling the flow of data to an external device, I.E. device will let the CPU know it is ready for (more) data, Allocation of CPU time - to different programs (multi-tasking), an internal clock times the execution of programs and sends an interrupt to the CPU, Abnormal event indicator - power failure, illegal instructions (/ by 0), non-existent OPCODE, Byte error, Internal Interrupts - traps or exceptions Software interrupts - SW simulation of interrupts, address space indicates which interrupt is called (INT), Keyboards use Programmed I/O and Interrupts Copyright 2010 John Wiley & Sons, Inc.

The CPU - The Interrupt Cycle Fetch / Execute cycle Interrupt cycle START Fetch Next Instruction Execute Instruction HALT Interrupts Disabled Process Interrupt Check for Interrupt Copyright 2010 John Wiley & Sons, Inc.

Servicing the Interrupt Lower priority interrupts are held until higher priority interrupts are complete Suspend program in progress Save context, including last instruction executed and data values in registers, in the PCB or the stack area in memory Branch to interrupt handler program Copyright 2010 John Wiley & Sons, Inc.

Servicing an Interrupt Copyright 2010 John Wiley & Sons, Inc.

Interrupt Processing Methods Vectored interrupt Address of interrupting device is included in the interrupt Requires additional hardware to implement Polling Identifies interrupting device by polling each device General interrupt is shared by all devices Copyright 2010 John Wiley & Sons, Inc.

Vectored Interrupts Copyright 2010 John Wiley & Sons, Inc.

Polled Interrupts Copyright 2010 John Wiley & Sons, Inc.

Print Handler Interrupt Copyright 2010 John Wiley & Sons, Inc.

Using an Interrupt for Time Sharing Copyright 2010 John Wiley & Sons, Inc.

Multiple Interrupts Example Copyright 2010 John Wiley & Sons, Inc.

Direct Memory Access Transferring large blocks of data Direct transfer to and from memory CPU not actively involved in transfer itself Required conditions for DMA The I/O interface and memory must be connected The I/O module must be capable of reading and writing to memory Conflicts between the CPU and the I/O module must be avoided Interrupt required for completion Copyright 2010 John Wiley & Sons, Inc.

DMA Instructions Application program requests I/O service from operating system privileged programmed I/O instructions To initiate DMA, programmed I/O is used to send the following information: location of data on I/O device the starting location in memory the size of the block read/write Interrupt to CPU upon completion of DMA Copyright 2010 John Wiley & Sons, Inc.

DMA Initiation and Control Copyright 2010 John Wiley & Sons, Inc.

I/O Module Interfaces Copyright 2010 John Wiley & Sons, Inc.

I/O Module Functions Recognizes messages from device(s) addressed to it and accepts commands from the CPU Provides a buffer where the data from memory can be held until it can be transferred to the device Provides the necessary registers and controls to perform a direct memory transfer Physically controls the device Copies data from its buffer to the device/from the CPU to its buffer Communicates with CPU Copyright 2010 John Wiley & Sons, Inc.

Copyright 2010 John Wiley & Sons All rights reserved. Reproduction or translation of this work beyond that permitted in section 117 of the 1976 United States Copyright Act without express permission of the copyright owner is unlawful. Request for further information should be addressed to the Permissions Department, John Wiley & Sons, Inc. The purchaser may make back-up copies for his/her own use only and not for distribution or resale. The Publisher assumes no responsibility for errors, omissions, or damages caused by the use of these programs or from the use of the information contained herein.” Copyright 2010 John Wiley & Sons, Inc.