Computer Architecture

Slides:



Advertisements
Similar presentations
Computer Architecture
Advertisements

I/O Organization popo.
Categories of I/O Devices
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
Chapter 10 Input/Output Organization. Connections between a CPU and an I/O device Types of bus (Figure 10.1) –Address bus –Data bus –Control bus.
1/1/ / faculty of Electrical Engineering eindhoven university of technology Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir.
I/O Unit.
CS-334: Computer Architecture
1/1/ / faculty of Electrical Engineering eindhoven university of technology Introduction Part 3: Input/output and co-processors dr.ir. A.C. Verschueren.
FIU Chapter 7: Input/Output Jerome Crooks Panyawat Chiamprasert
Interrupts (contd..) Multiple I/O devices may be connected to the processor and the memory via a bus. Some or all of these devices may be capable of generating.
COMP3221: Microprocessors and Embedded Systems Lecture 15: Interrupts I Lecturer: Hui Wu Session 1, 2005.
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
Computer System Structures memory memory controller disk controller disk controller printer controller printer controller tape-drive controller tape-drive.
CHAPTER 9: Input / Output
Group 7 Jhonathan Briceño Reginal Etienne Christian Kruger Felix Martinez Dane Minott Immer S Rivera Ander Sahonero.
2. Methods for I/O Operations
1 Computer System Overview Chapter 1 Review of basic hardware concepts.
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
The computer system’s I/O architecture is its interface to the outside world. This architecture provides a systematic means of controlling interaction.
Chapter 7 Input/Output Luisa Botero Santiago Del Portillo Ivan Vega.
Interrupts. 2 Definition: An electrical signal sent to the CPU (at any time) to alert it to the occurrence of some event that needs its attention Purpose:
COMP201 Computer Systems Exceptions and Interrupts.
Chapter 10: Input / Output Devices Dr Mohamed Menacer Taibah University
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 9: Input / Output
MICROPROCESSOR INPUT/OUTPUT
2007 Oct 18SYSC2001* - Dept. Systems and Computer Engineering, Carleton University Fall SYSC2001-Ch7.ppt 1 Chapter 7 Input/Output 7.1 External Devices.
Computer Architecture Lecture10: Input/output devices Piotr Bilski.
The Functions of Operating Systems Interrupts. Learning Objectives Explain how interrupts are used to obtain processor time. Explain how processing of.
Interrupts By Ryan Morris. Overview ● I/O Paradigm ● Synchronization ● Polling ● Control and Status Registers ● Interrupt Driven I/O ● Importance of Interrupts.
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.
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.
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CE-321: Computer.
COMPUTER ORGANIZATIONS CSNB123 NSMS2013 Ver.1Systems and Networking1.
Direct Memory Access (DMA) Microprocessors I -1. Topics to be discussed  Basic DMA Concept Basic DMA Concept  DMA pins and timing DMA pins and timing.
Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and.
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
13-Nov-15 (1) CSC Computer Organization Lecture 7: Input/Output Organization.
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.
The computer system’s I/O architecture is its interface to the outside world. This architecture provides a systematic means of controlling interaction.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
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
Input Output Techniques Programmed Interrupt driven Direct Memory Access (DMA)
بسم الله الرحمن الرحيم 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.
Amdahl’s Law & I/O Control Method 1. Amdahl’s Law The overall performance of a system is a result of the interaction of all of its components. System.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Overview: Using Hardware.
Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir. A.C. Verschueren Eindhoven University of Technology Section of Digital.
Lesson Objectives Aims Key Words Interrupt, Buffer, Priority, Stack
Direct Memory address and 8237 dma controller LECTURE 6
Computer Architecture
Chapter 8 Input/Output I/O basics Keyboard input Monitor output
Computer System Overview
Processor Fundamentals
COMPUTER PERIPHERALS AND INTERFACES
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Interrupt handling Explain how interrupts are used to obtain processor time and how processing of interrupted jobs may later be resumed, (typical.
COMP3221: Microprocessors and Embedded Systems
Presentation transcript:

Computer Architecture Interrupts and Polling

Interrupts Nearly all modern processors of any size allow interruption by external devices. An interrupt is an externally initiated transfer of program control. This means the CPU has no control over the arrival of an interrupt.

Interrupts The normal reason for such an interrupt is that some device, e.g. keyboard, disk, VDU, printer wants attention from the CPU. The device does not want to wait until the CPU takes the initiative, so it asks the CPU to stop what it is doing and turn its attention to the interrupting devices.

Interrupts The CPU has to be designed to detect the presence of an interrupt signal at least between each instruction and perhaps within an instruction. A CPU that can be interrupted within an instruction, breaking the instruction midway, is called restartable.

Interrupts The interrupt signal is a physical event on an interrupt request line. The CPU usually has some way of disabling or masking an interrupt if it is about to do a piece of work that should not be interrupted.

Interrupts To ensure the CPU can resume the interrupted program once the interrupt has been serviced, it must store any registers that could be overwritten by the interrupt service routine, also known as the interrupt handler. At the very least the program counter must be preserved.

Interrupts Any registers not automatically saved but subsequently required by the interrupt handler/service routine must be saved by the handler/service routine.

Interrupts Hardware interrupts can be prioritised by daisy chaining the interrupt acknowledge signal. Devices are all linked to the computer interrupt request input to produce a common interrupt request signal.

Interrupts When the CPU is ready to handle the interrupt request it sends an interrupt acknowledge signal to the device with the highest priority. If this device needs serviced it uses the signal itself, but if it does not need serviced it passes the signal on to the second device, and so on down the line.

Interrupts More complex interrupt controllers allow different priority levels of interrupt. There may be three different levels of interrupt, and devices connected to interrupt lines at a higher level are allowed to interrupt the servicing of devices at a lower level. A device at the same level has to wait until the interrupt handler is free.

Interrupts There are four main methods of controlling and synchronising input / output outside its domain where devices cannot utilise the system clock: 1. Program control I/O or Polling 2. Interrupt driven I/O 3. Direct Memory Access 4. Channel I/O

Interrupts Factors that need to be considered when choosing a method are: 1. Speed of the device. 2. Demand of the program on the processor. 3. Hardware complexity. 4. Software complexity.

Program Controlled I/O More commonly known as POLLING. Each device has registers for data, for status and control information. The data register is used to transfer data such as ASCII code for a character to be printed, while the status register is used to convey information, e.g. printer busy or out of paper.

Program Controlled I/O It is possible for the CPU to find a device status by interrogating the device status register. For example, if a string of characters are to be printed, the first character is sent to the printer’s data register, the CPU goes into a wait loop, continually checking the printer’s status register until printer ready to receive next character.

Program Controlled I/O Clearly, this method is a waste of CPU time and is only suitable for systems where this is of no consequence. In most systems it is better for the CPU to send the first character and get on with something else until the device sends a signal to say it is ready to accept more data.

Interrupt Driven I/O The I/O device issues an interrupt request signal to the CPU. The CPU will normally stop what it was doing, storing information required to restart from the same place after processing is completed for device request. Control is then passed onto interrupt service routine which receives the information from the I/O device.

Interrupt Driven I/O The CPU sends an acknowledgement to the device. When the ISR has finished it will first restore any registers it required to use to complete its task before passing control back to the CPU.

Direct Memory Access DMA is the name given to a method by which blocks of data can be sent from memory to a device and vice versa without detailed attention by the CPU. CPU is not required to handle numerous interrupts. DMA requires another bus controller device called a DMA controller.

Direct Memory Access DMA controller is able to work autonomously after it has been initialised by the CPU. Typically the DMA controller has 4 registers, a memory start address, a count of the number of words to be transferred, a device identifier and a direction flag to indicate input or output.

Direct Memory Access The DMA controller can be left to get on with a job until it interrupts the CPU on completed transfer. Considerable gain is achieved in relieving the CPU of I/O processing. But transfer of data still requires the data bus and therefore slows down access of CPU to memory. This deprivation of CPU by another bus controller is called cycle stealing.

Direct Memory Access Some DMA controllers match their use of the address and data buses to fit in with periods in an instruction cycle when the buses are not in use.

Direct Memory Access If a processor without DMA can process 15000 information packets per second with 50 % of its time taken up with transfer of packets and storage of data. When adding a DMA controller transfer time is reduced to 10%. Therefore, the processor working at 100% will process 15000 + (15000 – (15000 * 0.10) = 28500 packet per second

DMA V’s Non-DMA

Channel I/O Channel I/O controllers or I/O processors have been a feature of larger machines for quite a while. They are really processors dedicated to running programs devoted to the I/O task. The use of these controllers reduces the involvement of the CPU even further.

I/O additional Resources http://ncca.bournemouth.ac.uk/CourseInfo/BAVisAn/Year1/CompSys/IO/