COMPUTER ORGANIZATIONS CSNB123 NSMS2013 Ver.1Systems and Networking1.

Slides:



Advertisements
Similar presentations
I/O Organization popo.
Advertisements

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.
I/O Unit.
CS-334: Computer Architecture
Computer Organization and Architecture Input/Output.
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.
Chapter 7 Interupts DMA Channels Context Switching.
Midterm Tuesday October 23 Covers Chapters 3 through 6 - Buses, Clocks, Timing, Edge Triggering, Level Triggering - Cache Memory Systems - Internal Memory.
Chapter 7 Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats.
Unit-5 CO-MPI autonomous
Group 7 Jhonathan Briceño Reginal Etienne Christian Kruger Felix Martinez Dane Minott Immer S Rivera Ander Sahonero.
2. Methods for I/O Operations
INPUT/OUTPUT ARCHITECTURE By Truc Truong. Input Devices Keyboard Keyboard Mouse Mouse Scanner Scanner CD-Rom CD-Rom Game Controller Game Controller.
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.
Chapter 10: Input / Output Devices Dr Mohamed Menacer Taibah University
I/O Sub-System CT101 – Computing Systems.
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 ORGANIZATIONS CSNB123 NSMS2013 Ver.1Systems and Networking1.
MICROPROCESSOR INPUT/OUTPUT
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Principles of I/0 hardware.
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
2007 Oct 18SYSC2001* - Dept. Systems and Computer Engineering, Carleton University Fall SYSC2001-Ch7.ppt 1 Chapter 7 Input/Output 7.1 External Devices.
Top Level View of Computer Function and Interconnection.
Computer Architecture Lecture10: Input/output devices Piotr Bilski.
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.
COMPUTER ORGANIZATIONS CSNB123. COMPUTER ORGANIZATIONS CSNB123 Expected Course Outcome #Course OutcomeCoverage 1Explain the concepts that underlie modern.
ECEG-3202 Computer Architecture and Organization Chapter 3 Top Level View of Computer Function and Interconnection.
Organisasi Sistem Komputer Materi VIII (Input Output)
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.
The computer system’s I/O architecture is its interface to the outside world. This architecture provides a systematic means of controlling interaction.
Dr Mohamed Menacer College of Computer Science and Engineering, Taibah University CE-321: Computer.
PART 7 CPU Externals CHAPTER 7: INPUT/OUTPUT 1. Input/Output Problems Wide variety of peripherals – Delivering different amounts of data – At different.
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)
I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.
Group 1 chapter 3 Alex Francisco Mario Palomino Mohammed Ur-Rehman Maria Lopez.
بسم الله الرحمن الرحيم MEMORY AND I/O.
Multiple Interrupts Each interrupt line has a priority Higher priority lines can interrupt lower priority lines If bus mastering only current master can.
Chapter 3 System Buses.  Hardwired systems are inflexible  General purpose hardware can do different tasks, given correct control signals  Instead.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
Computer Architecture Chapter (7): Input / Output
Computer Architecture
Computer Organization and Architecture + Networks Lecture 6 Input/Output.
CHAPTER 4 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
BIC 10503: COMPUTER ARCHITECTURE
Computer System Overview
Created by Vivi Sahfitri
Computer System Overview
Jazan University, Jazan KSA
I/O subsystem Overview Peripheral Devices and IO Modules
Presentation transcript:

COMPUTER ORGANIZATIONS CSNB123 NSMS2013 Ver.1Systems and Networking1

COMPUTER ORGANIZATIONS CSNB123 Programmed I/O Direct Memory Access (DMA) Interrupt Driven I/O NSMS2013 Ver.1Systems and Networking2

COMPUTER ORGANIZATIONS CSNB123 Programmed I/O The processor executes a program that gives it direct control of the I/O operation such as sensing devices status, sending a read/write command and transferring the data NSMS2013 Ver.1Systems and Networking3 I/O Techniques Programmed I/O DMA Interrupt Driven I/O

COMPUTER ORGANIZATIONS CSNB123 Programmed I/O (Cont.) I/O Techniques Programmed I/O I/O Command I/O Instruction DMA Interrupt Driven I/O I/O Command  Related to instruction  CPU issues an address, specify the particular I/O module and ED, and an I/O command NSMS2013 Ver.1Systems and Networking4 CommandDescription ControlActivate the ED, give instruction Testtest various status conditions associated - I/O module, ED ReadI/O module to receive an item from the peripheral devices  place it into an internal register WriteI/O module to take a unit of data from the data bus and transmit it to the peripheral

COMPUTER ORGANIZATIONS CSNB123 Programmed I/O (Cont.) Example: use programmed I/O to read in a block of data from a peripheral devices into memory Data are read in one word -16 bits, at a time For each word read, CPU must remain in a status checking cycle until it determines that the word is available in the I/O module’s data register Disadvantage; Time consuming – keep CPU busy unnecessarily NSMS2013 Ver.1Systems and Networking5

COMPUTER ORGANIZATIONS CSNB123 Programmed I/O (Cont.) I/O Instructions Situation: CPU fetch instruction from memory and the I/O command that the CPU issues to an I/O module to execute the instructions  Instructions are mapped into I/O command Form of instruction depends on the way of ED is addressed – unique identifier or address NSMS2013 Ver.1Systems and Networking6 I/O Techniques Programmed I/O I/O Command I/O Instruction DMA Interrupt Driven I/O

COMPUTER ORGANIZATIONS CSNB123 Programmed I/O (Cont.) I/O Instructions I/O module will interpret the address line – determine the command for itself 2 modes of addressing  Memory-mapped I/O  Isolated NSMS2013 Ver.1Systems and Networking7 I/O Techniques Programmed I/O I/O Command I/O Instruction DMA Interrupt Driven I/O

COMPUTER ORGANIZATIONS CSNB123 Programmed I/O (Cont.) Memory-mapped I/O A single address space for memory locations and I/O devices The processor treats the status and data registers of I/O modules as memory locations and uses the same machine instructions to access both memory and I/O devices Example: with 10 address lines, a combine 1024 memory locations and I/O addresses can be supported NSMS2013 Ver.1Systems and Networking8

COMPUTER ORGANIZATIONS CSNB123 Programmed I/O (Cont.) Isolated I/O Separate address space for both memory and I/O devices Separate memory and I/O select lines needed Small number of I/O instructions Common used NSMS2013 Ver.1Systems and Networking9

COMPUTER ORGANIZATIONS CSNB123 Interrupt Driven I/O Overcomes CPU waiting No repeated CPU checking of device I/O module interrupts when ready NSMS2013 Ver.1Systems and Networking10 I/O Techniques Programmed I/O Interrupt Driven I/O DMA

COMPUTER ORGANIZATIONS CSNB123 Interrupt Driven I/O (Cont.) Basic operations 1.CPU issues read command 2.I/O module gets data from peripheral whilst CPU does other work 3.I/O module interrupts CPU 4.CPU requests data 5.I/O module transfers data NSMS2013 Ver.1Systems and Networking11 I/O Techniques Programmed I/O Interrupt Driven I/O DMA I/O Module CPU ED

COMPUTER ORGANIZATIONS CSNB123 Interrupt Driven I/O (Cont.) - Input the data from ED to Memory via Processor From I/O View 1.I/O M receives a READ command from CPU 2.The I/O M then leads to read data from an associated ED 3.Once the data are in the module’s data register, the I/O M interrupt the CPU over a control line 4.I/O M then waits until its data are requested by CPU 5.When the request is made, the I/O M places its data on the data bus and then ready for another I/O operation From CPU view 1.CPU issues READ command 2.Then CPU do other works 3.At the end of each instruction cycle, CPU checks for interrupt 4.When there is interrupts from I/O M, then CPU process the interrupt 5.CPU reads the word of data from the I/O M and save it in memory and resumes execution NSMS2013 Ver.1Systems and Networking12

COMPUTER ORGANIZATIONS CSNB123 Interrupt Driven I/O (Cont.) NSMS2013 Ver.1Systems and Networking13 Technique for Input of a Block of Data

COMPUTER ORGANIZATIONS CSNB123 Interrupt Driven I/O (Cont.) – Simple Interrupt Processing StepDescription AED issues an interrupt signal to the CPU B CPU finishes execution of the current instruction before responding to the interrupt C CPU test for the interrupt; if there is one interrupt pending, and then the CPU sends as acknowledgement signal to the ED which issued the interrupt. Get the signal - ED removes its interrupt signals D CPU save info needed to resume the current program at the point of interrupt. Require processor status word (PSW) and address of the next instruction E CPU loads the PC with the entry location of the interrupt handling program - respond to the interrupt NSMS2013 Ver.1Systems and Networking14

COMPUTER ORGANIZATIONS CSNB123 Interrupt Driven I/O (Cont.) – Simple Interrupt Processing StepDescription FPC and PSW relating to the interrupted program have been saved on the system stack (place in memory) G The interrupt handles next processes the interrupt. This includes an examination of status information relating to the I/O operation or, other event that caused an interrupt H When interrupt processing is complete, the saved register values are retrieved from the stack and restored to the registers I The final act is to register the PSW and program counter values from the stack. As a result, the next instruction to be executed will be from the previously interrupted program NSMS2013 Ver.1Systems and Networking15

COMPUTER ORGANIZATIONS CSNB123 Interrupt Driven I/O (Cont.) – Design Issue Two design issues  How does the CPU determine which ED issued the interrupt?  If multiple interrupt occured, how does the CPU decide which one to process? NSMS2013 Ver.1Systems and Networking16

COMPUTER ORGANIZATIONS CSNB123 Interrupt Driven I/O (Cont.) – Design Issue Consider device identification. 4 categories;  Multiple interrupt lines  Software poll  Daisy chain  Bus arbitration NSMS2013 Ver.1Systems and Networking17

COMPUTER ORGANIZATIONS CSNB123 Interrupt Driven I/O (Cont.) – Design Issue Multiple interrupt lines  Straightforward approach  Located between CPU and I/O Modules  Impractical to dedicate more than a few bus lines or CPU pins to interrupt lines Each line attach to multiple I/O modules NSMS2013 Ver.1Systems and Networking18

COMPUTER ORGANIZATIONS CSNB123 Interrupt Driven I/O (Cont.) – Design Issue Software poll  CPU detects interrupt – branches to an interrupt- service routine  job it is to poll each I/O module  determine which module caused the interrupt  Poll – separate command line form  CPU asks each module in turn - slow NSMS2013 Ver.1Systems and Networking19

COMPUTER ORGANIZATIONS CSNB123 Interrupt Driven I/O (Cont.) – Design Issue Software poll  CPU detects interrupt – branches to an interrupt- service routine  job it is to poll each I/O module  determine which module caused the interrupt  Poll – separate command line form  CPU asks each module in turn – slow (time consuming) NSMS2013 Ver.1Systems and Networking20

COMPUTER ORGANIZATIONS CSNB123 Interrupt Driven I/O (Cont.) – Design Issue Daisy chain  Interconnection of computer devices, peripherals, or network nodes in series, one after another  All I/O modules share a common interrupt request line  The interrupt acknowledge line is daisy chained (hardware poll) through the modules  When the CPU senses the interrupt, it send out an interrupt acknowledge  This signal propagates via a series of I/O modules till reach a requesting module  The requesting model respond and place a word on the data lines NSMS2013 Ver.1Systems and Networking21

COMPUTER ORGANIZATIONS CSNB123 Interrupt Driven I/O (Cont.) – Design Issue Bus arbitration  I/O Module must claim the bus before it can raise interrupt  Only one module can raise the interrupt at a time  When the CPU detects the interrupt, it responds on the interrupt acknowledge line  The requesting module then places its vector on the data lines NSMS2013 Ver.1Systems and Networking22

COMPUTER ORGANIZATIONS CSNB123 Direct Memory Access (DMA) Function Additional Module (hardware) on the system bus Mimic the CPU – control of the system Use system bus for data transferring;  when the processor does not need it  Force CPU to suspend NSMS2013 Ver.1Systems and Networking23 I/O Techniques Programmed I/O Interrupt Driven I/O DMA

COMPUTER ORGANIZATIONS CSNB123 Direct Memory Access (DMA) (Cont.) NSMS2013 Ver.1Systems and Networking24 I/O Techniques Programmed I/O Interrupt Driven I/O DMA

COMPUTER ORGANIZATIONS CSNB123 Direct Memory Access (DMA) (Cont.) I/O Techniques Programmed I/O Interrupt Driven I/O DMA DMA Block Diagram NSMS2013 Ver.1Systems and Networking25

COMPUTER ORGANIZATIONS CSNB123 Direct Memory Access (DMA) (Cont.) I/O Techniques Programmed I/O Interrupt Driven I/O DMA DMA Operation NSMS2013 Ver.1Systems and Networking26 CPU tells DMA controller:-  Read/Write  Device address  Starting address of memory block for data  Amount of data to be transferred CPU carries on with other work DMA controller deals with transfer DMA controller sends interrupt when finished

COMPUTER ORGANIZATIONS CSNB123 Direct Memory Access (DMA) (Cont.) I/O Techniques Programmed I/O Interrupt Driven I/O DMA DMA Transfer – Cycle stealing NSMS2013 Ver.1Systems and Networking27 DMA controller takes over bus for a cycle Transfer of one word of data Not an interrupt  CPU does not switch context CPU suspended just before it accesses bus Slows down CPU but not as much as CPU doing transfer

COMPUTER ORGANIZATIONS CSNB123 Direct Memory Access (DMA) (Cont.) DMA Transfer – Cycle stealing (Cont.) NSMS2013 Ver.1Systems and Networking28 CPU delegates the I/O operation to DMA module The DMA module transfer the entire block of data one at a time directly to or from memory When transfer completes - DMA module sends an interrupt signal to the CPU CPU only involved at the beginning and end of transmission Advantage:  DMA is faster than programmed I/O and Interrupt I/O for multiple-word I/O transfer.

COMPUTER ORGANIZATIONS CSNB123 Direct Memory Access (DMA) (Cont.) I/O Techniques Programmed I/O Interrupt Driven I/O DMA DMA Configuration NSMS2013 Ver.1Systems and Networking29 Single-bus, detached DMA Single-bus, integrated DMA I/O I/O bus

COMPUTER ORGANIZATIONS CSNB123 Direct Memory Access (DMA) (Cont.) DMA Configuration – Single-bus, detached DMA NSMS2013 Ver.1Systems and Networking30 All modules share the same system bus Each transfer uses bus twice  I/O to DMA then DMA to memory

COMPUTER ORGANIZATIONS CSNB123 Direct Memory Access (DMA) (Cont.) DMA Configuration – Single-bus, integrated DMA I/O NSMS2013 Ver.1Systems and Networking31 Controller may support >1 device Each transfer uses bus once  DMA to memory

COMPUTER ORGANIZATIONS CSNB123 Direct Memory Access (DMA) (Cont.) DMA Configuration – I/O Bus NSMS2013 Ver.1Systems and Networking32 Separate I/O Bus Bus supports all DMA enabled devices Each transfer uses bus once  DMA to memory