I/O Interfacing A lot of handshaking is required between the CPU and most I/O devices. All I/O devices operate asynchronously with respect to the CPU.

Slides:



Advertisements
Similar presentations
I/O Organization popo.
Advertisements

Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
Computer Architecture
1/1/ / faculty of Electrical Engineering eindhoven university of technology Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir.
8086.  The 8086 is Intel’s first 16-bit microprocessor  The 8086 can run at different clock speeds  Standard 8086 – 5 MHz  –10 MHz 
Interrupts Disclaimer: All diagrams and figures in this presentation are scanned from the book “Microprocessors and Programmed Logic” authored by Kenneth.
I/O Unit.
1/1/ / faculty of Electrical Engineering eindhoven university of technology Introduction Part 3: Input/output and co-processors dr.ir. A.C. Verschueren.
Interrupts What is an interrupt? What does an interrupt do to the “flow of control” Interrupts used to overlap computation & I/O – Examples would be console.
COMP3221: Microprocessors and Embedded Systems Lecture 15: Interrupts I Lecturer: Hui Wu Session 1, 2005.
1 Lecture 2: Review of Computer Organization Operating System Spring 2007.
6-1 I/O Methods I/O – Transfer of data between memory of the system and the I/O device Most devices operate asynchronously from the CPU Most methods involve.
1 Computer System Overview OS-1 Course AA
Introduction An interrupt is an event which informs the CPU that its service (action) is needed. Sources of interrupts: internal fault (e.g.. divide by.
Basic Input/Output Operations
1 Interrupts INPUT/OUTPUT ORGANIZATION: Interrupts CS 147 JOKO SUTOMO.
1 Computer System Overview Chapter 1 Review of basic hardware concepts.
Chapter 8 Input/Output. Busses l Group of electrical conductors suitable for carrying computer signals from one location to another l Each conductor in.
Interrupts. What Are Interrupts? Interrupts alter a program’s flow of control  Behavior is similar to a procedure call »Some significant differences.
created by :Gaurav Shrivastava
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.
Computer System Overview Chapter 1. Operating System Exploits the hardware resources of one or more processors Provides a set of services to system users.
Input and Output Computer Organization and Assembly Language: Module 9.
Input/ Output By Mohit Sehgal. What is Input/Output of a Computer? Connection with Machine Every machine has I/O (Like a function) In computing, input/output,
MICROPROCESSOR INPUT/OUTPUT
Input/Output. I/O Initiation & Control  Transfer of data between circuitry external to the microprocessor and the microprocessor itself.  Transfer of.
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment.
Khaled A. Al-Utaibi  Interrupt-Driven I/O  Hardware Interrupts  Responding to Hardware Interrupts  INTR and NMI  Computing the.
Computer Architecture Lecture10: Input/output devices Piotr Bilski.
Interrupt.
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
Microprocessor. Interrupts The processor has 5 interrupts. CALL instruction (3 byte instruction). The processor calls the subroutine, address of which.
Modes of transfer in computer
1 © Unitec New Zealand Interrupt Lecture 6 Date: - 20 Sept, 2011 Embedded Hardware ETEC 6416.
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.
Fall 2000M.B. Ibáñez Lecture 25 I/O Systems. Fall 2000M.B. Ibáñez Categories of I/O Devices Human readable –used to communicate with the user –video display.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Lecture 1: Review of Computer Organization
ECE 353 Introduction to Microprocessor Systems Michael J. Schulte Week 11.
بسم الله الرحمن الرحيم MEMORY AND I/O.
9/20/6Lecture 3 - Instruction Set - Al1 Exception Handling.
Interrupt-Driven I/O There are different types of interrupts –Hardware Generated by the 8259 PIC – signals the CPU to suspend execution of the current.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
Multiplex of Data and Address Lines in 8088 Address lines A0-A7 and Data lines D0-D7 are multiplexed in These lines are labelled as AD0-AD7. –By.
Interrupts and Exception Handling. Execution We are quite aware of the Fetch, Execute process of the control unit of the CPU –Fetch and instruction as.
INTERRUPTS. Topics to be discussed  8088/86 Hardware Interrupts pins 8088/86 Hardware Interrupts pins   Pin description Pin description.
Introduction to Exceptions 1 Introduction to Exceptions ARM Advanced RISC Machines.
1 Computer System Overview Chapter 1. 2 Operating System Exploits the hardware resources of one or more processors Provides a set of services to system.
Unit Microprocessor.
Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir. A.C. Verschueren Eindhoven University of Technology Section of Digital.
An Interrupt is either a Hardware generated CALL (externally derived from a hardware signal) OR A Software-generated CALL (internally derived from.
COURSE OUTCOMES OF Microprocessor and programming
MICROPROCESSOR BASED SYSTEM DESIGN
Microprocessor Systems Design I
Introduction to the processor and its pin configuration
I/O Memory Interface Topics:
Interrupts In 8085 and 8086.
8086/8088 Hardware Specifications
E3165 DIGITAL ELECTRONIC SYSTEM
Chapter 8 Input/Output I/O basics Keyboard input Monitor output
Computer Architecture
Interrupts Interrupt is a process where an external device can get the attention of the microprocessor. The process starts from the I/O device The process.
11.1 Interrupt Mechanism, Type, and Priority
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
CHAPTER 6 INPUT/OUTPUT PROGRAMMING
Chapter 13: I/O Systems.
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

I/O Interfacing A lot of handshaking is required between the CPU and most I/O devices. All I/O devices operate asynchronously with respect to the CPU. The events that determine when an input device has data available or when an output device needs data are independent of the CPU.

Three I/O strategies Must be capable of data rates fast enough to keep up with the demands of the device, but must not be allowed to transfer data faster than the device can process it. »Polled waiting loops »Interrupt-driven I/O »Direct memory Access (DMA)

Synchronization The CPU must have some way of checking the status of the device and waiting until it is ready to transfer

Transfer Rate A measure of the number of bytes per second transferred between the CPU and an external device. Maximum transfer rate – a measure of the bandwidth capability of a particular method of doing I/O.

Comparison of transfer rates Polled waiting loops provide data rates that are a bit slower, but still quite reasonable. Interrupt-driven I/O requires overhead of saving and restoring the machine state (significantly degrades data rates unless more than one byte can be transferred per interrupt. DMA has fastest transfer rates (additional hardward complexity needed.

Latency Measure of the delay from the instant that the device is ready until the time the first data byte is transferred. Latency is equivalent to the “response time”

Comparison of Latency Polled Waiting Loops – latency can be very high (the computer may not even be checking the device for new data when it arrives). Interrupt-driven I/O – dramatically lower than polled, but still imposes a software overhead. DMA – very low (lower than the others)

Polled Waiting I/O Use software to test the status of a device,before transferring each data byte. Continuously checking the peripheral’s BUSY/READY flag Ties up the CPU – no other tasks can be performed.

Interrupt-Driven I/O There are different types of interrupts –Hardware Generated by the 8259 PIC – signals the CPU to suspend execution of the current program and process the interrupt (keyboard, serial port) Occasionally, programs must disable hardware interrupts when performing sensitive operations on segment registers and the stack. Use CLI (Clear Interrupt flag) to disable interrupts and STI (Set interrupt flag) to enable interrupts. –Software Not really an interrupt (INT) –Internal Interrupts Divide by zero Traps

Responding to Interrupts

Hardware Interrupt Pins NMI – non-maskable interrupt – it cannot be blocked (the CPU must respond) – reserved for critical system functions. INTR – maskable via the IF flag.