Computer Organization and Architecture + Networks Lecture 6 Input/Output.

Slides:



Advertisements
Similar presentations
CS-334: Computer Architecture
Advertisements

Computer Organization and Architecture Input/Output.
FIU Chapter 7: Input/Output Jerome Crooks Panyawat Chiamprasert
1 Pertemuan 12 Input/Output Matakuliah: H0344/Organisasi dan Arsitektur Komputer Tahun: 2005 Versi: 1/1.
Input/Output.
Chapter 7 Interupts DMA Channels Context Switching.
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
External Devices I/O Modules Programmed I/O Interrupt Driven I/O Direct Memory Access I/O Channels and Processors.
Group 7 Jhonathan Briceño Reginal Etienne Christian Kruger Felix Martinez Dane Minott Immer S Rivera Ander Sahonero.
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
Input/OUTPUT [I/O Module structure].
I/O Sub-System CT101 – Computing Systems.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Principles of I/0 hardware.
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.
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 NSMS2013 Ver.1Systems and Networking1.
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.
School of Computer Science G51CSA 1 Input / Output.
Chapter5: Input/Output (I/O).
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.
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)
بسم الله الرحمن الرحيم 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.
ECE 456 Computer Architecture Lecture #9 – Input/Output Instructor: Dr. Honggang Wang Fall 2013.
Computer Architecture Chapter (7): Input / Output
EEL4709C Dr. Watson Summer 2009 Juan Benatuil William Raad.
Computer Organization and Architecture Chapter 7 Input/Output.
Chapter 7 Input/Output. Input/Output Problems Wide variety of peripherals Delivering different amounts of data Delivering different amounts of data At.
William Stallings Computer Organization and Architecture 6th Edition
Chapter 13: I/O Systems Modified by Dr. Neerja Mhaskar for CS 3SH3.
I/O SYSTEMS MANAGEMENT Krishna Kumar Ahirwar ( )
Unit- 3 Chapter 7 Input/Output.
Operating Systems (CS 340 D)
William Stallings Computer Organization and Architecture 7th Edition
Computer Architecture
BIC 10503: COMPUTER ARCHITECTURE
CSCI 315 Operating Systems Design
Created by Vivi Sahfitri
William Stallings Computer Organization and Architecture 8th Edition
William Stallings Computer Organization and Architecture 8th Edition
William Stallings Computer Organization and Architecture 8th Edition
Jazan University, Jazan KSA
Chapter 13: I/O Systems.
I/O subsystem Overview Peripheral Devices and IO Modules
Presentation transcript:

Computer Organization and Architecture + Networks Lecture 6 Input/Output

Input/Output - Review CPU Computer Arithmetic Instruction Sets Interconnection Interconnection Structure Bus Interconnection PCI Memory Cache Memory Internal Memory External Memory Virtual Memory This lecture

Input/Output Problems Input/Output modules are the third critical element of the computer system besides CPU and the memory Input/Output modules – contains the logic for performing communication function between the peripheral and the bus Reasons for not connecting the peripherals (I/O components) directly to the system bus: —Peripherals have different methods of operation —Delivering different amounts of data/word lengths —At different speeds/mismatch of data rates – peripherals data rates are slower/faster than the memory/processor —In different formats Need I/O modules

Input/Output Module I/O modules: Provides a standard interface to CPU and Memory through the system bus Interface to one or more peripherals by tailored data links Relieves the CPU of the management of the I/O devices Interface consists of  Control  Status and  Data signals

Generic Model of I/O Module To peripheral device I/O Module External device block diagram

External Devices There are 3 categories of External Devices: i.Human readable – communicating with computer user —Screen, printer, keyboard ii.Machine readable – communicating with equipment —Monitoring and control iii.Communication – communicating with remote devices —Modem —Network Interface Card (NIC) Interface to the I/O module: i.Control signals – determine the function that the device will perform eg. Send/accept data ii.Data – set of bits to be sent/received  I/O iii.Status signals – indicate the state of the device eg. Ready or NOT ready for data/control transfer

External Devices Other components of the I/O module: i.Control logic – control the device’s operation ii.Transducer – converts electrical  other forms iii.Buffer – to temporarily hold data

Typical I/O Data Rates

I/O Module Function Function of I/O module: i.Control & Timing – coordinate the flow of traffic ii.CPU Communication – command decoding, address recognition, status reporting iii.Device Communication – involve status, commands, data iv.Data Buffering – to compensate for the different data transfer rate v.Error Detection – reports mechanical/electrical error

I/O Steps I/O sequence of steps in the transfer of data from an external devices to the processor: 1.CPU checks I/O module device status 2.I/O module returns status 3.If ready, CPU requests data transfer 4.I/O module gets data from device 5.I/O module transfers data to CPU 6.Variations for output, DMA, etc.

I/O Module Diagram

I/O Module Decisions Decisions made by the I/O module: ① Hide or reveal device properties to CPU ② Support multiple or single device ③ Control device functions or leave for CPU ④ Also O/S decisions —e.g. Unix treats everything it can as a file

Input Output Techniques Three Principal Input Output Techniques:  Programmed  Interrupt driven  Direct Memory Access (DMA)

Programmed I/O I/O operation in which CPU issues the I/O command to the I/O module CPU has direct control over I/O operation eg. Sensing status, read/write commands, transferring data —CPU waits until the I/O operation is completed before it can perform other tasks —Completion indicated by a change in the module status bits —CPU must periodically poll the module to check its status As a result of the speed difference between a CPU and the peripheral devices (orders of magnitude), programmed I/O wastes an enormous amount of CPU processing power —Very inefficient —CPU slowed to the speed of the peripheral

Programmed I/O Advantages —Simple to implement —Requires very little special software or hardware

Programmed I/O – Input of a Block of Data Programmed I/O operation CPU requests I/O operation I/O module performs operation I/O module sets status bits CPU checks status bits periodically I/O module does not inform CPU directly I/O module does not interrupt CPU CPU may wait or come back later

Programmed I/O I/O Addressing or Mapping Isolated (standard) I/O —Address spaces of the I/O modules is isolated from the memory address space —Need I/O or memory select lines – separate instructions in the instruction set are used to perform I/O —Special commands for I/O – typical control lines include the read/write lines plus an IO/M line to switch address reference between memory space and I/O space Memory mapped I/O —Devices and memory share an address space – I/O devices are integrated into the normal memory address space —I/O looks just like memory read/write – all of the memory accessing instructions can be used to access the I/O peripherals —No special commands for I/O – large selection of memory access commands available in current systems

Interrupt Driven I/O To reduce the time spent on I/O operations, the CPU can use an interrupt-driven approach —CPU issues I/O command to the module —CPU continues with its other tasks while the module performs its task —Module signals the CPU when the I/O operation is finished (the interrupt) —CPU responds to the interrupt by executing an interrupt service routine and then continues on with its primary task CPU recognizes and responds to interrupts at the end of an instruction execution cycle Interrupt technique is used to support a wide variety of devices

Interrupt Driven I/O Interrupt-driven I/O CPU issues read command I/O module gets data from peripheral whilst CPU does other work I/O module interrupts CPU CPU requests data I/O module transfers data

Interrupt Driven I/O CPU’s response to an interrupt

Interrupt Driven I/O Design issues  with multiple modules and thus multiple interrupts —How does the CPU identify the module issuing the interrupt? —How does the CPU deal with multiple interrupts? If multiple interrupts occur at the same time, which is processed first? –i.e. an interrupt handler being interrupted Interrupt determination —Provide multiple interrupt signal lines for a system –Practically only for small numbers of interrupts —Use 1 interrupt for more than 1 device –Must perform some sort of device polling to determine which requested service –Requesting device can place an ID on the bus  vectored interrupts Determination scheme prioritizes multiple interrupts

Interrupt Driven I/O Intel 8259 Interrupt Controller

82C59A Interrupt Controller

Direct Memory Access Both programmed and interrupt driven I/O require the continued involvement of the CPU in ongoing I/O operations Direct memory accessing takes the CPU out of the task except for initialization of the operation Large amounts of data can be transferred between memory and the peripheral without severly impacting CPU performance —CPU initializes DMA module –Read or write operation defined –I/O device involved –Starting address of memory block –Number of words to be transferred —CPU then continues with other work

Direct Memory Access Direct memory accessing I/O 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

Direct Memory Access DMA operates by “stealing” bus cycles from the CPU —In practice, it uses the bus when the CPU is not using it  no impact on the CPU performance —Access memory to retrieve a data word —Forwards the word to the I/O peripheral DMA configurations

DMA Configurations (1) Single Bus, Detached DMA controller Each transfer uses bus twice —I/O to DMA then DMA to memory CPU is suspended twice

DMA Configurations (2) Single Bus, Integrated DMA controller Controller may support more than 1 device Each transfer uses bus once —DMA to memory CPU is suspended once

DMA Configurations (3) Separate I/O Bus Bus supports all DMA enabled devices Each transfer uses bus once —DMA to memory CPU is suspended once

I/O Channels I/O devices getting more sophisticated e.g. 3D graphics cards CPU instructs I/O controller to do transfer I/O controller does entire transfer Improves speed —Takes load off CPU —Dedicated processor is faster

I/O Channel Architecture Control multiple high speed device At any one time, can only do one transfer of data with one of the devices Selector channel replaces function of CPU Can handle I/O with multiple devices For low-speed device: byte multiplexor is used to transfer characters For high-speed device: block multiplexor transfer blocks of data from several devices

External Interface The external interface, made with the I/O module, must be tailored to the nature and operation of the peripheral —Parallel vs. Serial data transfers —Data format conversions —Transfer rates —Number of devices supported Example: —FireWire (IEEE 1394)  high performance serial bus; data rates from 25 to 400Mbps —InfiniBand  data transfer is up to 30 Gbps; intended to replace PCI in servers

Foreground Reading Check out Universal Serial Bus (USB) Compare with other communication standards e.g. Ethernet