Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 8 Input/Output. Busses l Group of electrical conductors suitable for carrying computer signals from one location to another l Each conductor in.

Similar presentations

Presentation on theme: "Chapter 8 Input/Output. Busses l Group of electrical conductors suitable for carrying computer signals from one location to another l Each conductor in."— Presentation transcript:

1 Chapter 8 Input/Output

2 Busses l Group of electrical conductors suitable for carrying computer signals from one location to another l Each conductor in the bus is referred to as a line and carries a single signal - such as a bit in an address

3 Line Categories l Data lines - carrying data from one location to another l Address lines - specify address of recipient l Control lines - for synchronization of bus and modules connected to bus l Power lines - carry power to a module

4 Typical Uses of Busses l Transfer data between CPU and memory l Transfer data between CPU and computer peripherals l Transfer data between different points within the CPU

5 Point-to-Point Busses l Bus carries signals from a specific source to a specific destination l Example - cable connecting parallel or serial computer port to peripheral

6 Multi-point Bus l Bus connects several points together l Bus broadcasts a signal to every recipient on the bus l In most cases, an address accompanies the signal in order to identify the desired destination l Example - Ethernet network connection

7 Pt-to-Pt and Multi-Pt Busses

8 CPU - I/O l A P-P bus may be used to connect CPU to memory l A M-P bus may connect CPU to memory and/or to I/O modules l Referred to as a backplane, system bus, external bus l Bridge - interface between different busses that allow them to communicate

9 Typical PC Bus Connections PCI - Peripheral Component Interface AGP - Accelerated Graphics Processor ISA - Industry Standard Architecture EISA - Extended ISA USB - Universal Serial Bus VLB - Video Electronics Standards Bus SCSI - Small Computer System Interface IEEE 1395 Bus (FireWire) RS232-C serial PC bus

10 Characteristics of Busses Bus Width Speed Bandwidth (bits) (MHz) (Mbytes/sec)

11 PCI Bus l 32- or 64-bit bus used in Suns, Apples, Compaq, Alpha,... l Backplane bus interconnecting CPU and various plug-in I/O modules that control serial and parallel ports, sound cards, disks, … l CPU sends signals to bus via individual pins of the integrated circuit

12 PCI Bus Connections

13 Pentium III Bus Lines

14 Focus on I/O Devices l Objective - provide a method to allow efficient utilization of the CPU while I/O is taking place Keyboard Disk Monitor Printer l Each device operates at a different speed but the CPU is the fastest

15 Differences in I/O requirements l Keyboard - slow, sporadic input much waiting between keying enter text or send special control messages such as CTRL keys or function keys user may enter input in response to a request or interrupt the CPU l Mouse - can also generate expected or unexpected input

16 Other I/O Requirements l Hard Disk, CDROM or DVD - usually transfer large amounts of data in blocks instead of one character at a time l CPU should be free to do other tasks while the I/O is taking place l Disk, printer, and monitors operate under program control l Newer DVD and CDROMs self-initiate when placed in the drive

17 Summarize Requirements for I/O l Each device must be individually addressed l Each device must be able to initiate communication with the CPU l Information could be transferred directly to the CPU by individual word for slower character input, but faster and direct transfer to memory is also needed

18 Simple I/O Configuration

19 More Complex I/O Configuration

20 Programmed I/O l Simplest form of I/O (Figure 8.2) l I/O module connected to a pair of I/O registers in the CPU via a bus l Registers similar to MAR and MDR l Information is transferred one word at a time (64 bits) l Very slow - only for small amounts of data l CPU is involved in every step of the process

21 Programmed I/O

22 Programmed I/O (continued)

23 Concept of Interrupts l “signal that causes the CPU to alter its normal flow of instruction execution” l Interrupt lines are special control lines to the CPU l Messages sent over those lines are known as interrupts l More efficient than polling since devices are frequently idle and the CPU is so fast

24 Servicing an Interrupt l Interrupt causes temporary suspension of the program currently running l Current registers and instruction are saved in a special area known as the stack or PCB (Process Control Block) l Interrupt handler program starts execution l When complete, the registers and program instruction is restored and program resumes

25 Servicing an Interrupt

26 Why Are Interrupts Used? l External event - such as input from the keyboard(Example Figure 8.6) l Completion signal - control output to printers l Allocating CPU time - giving execution time to many processes l Abnormal Events - Power failure, illegal instructions, non existent op codes

27 External Event - Keyboard Input

28 Completion Signal - Print Handler

29 Allocating CPU Time

30 Multiple Interrupts l Different events may vie for service - thus, multiple interrupts l How to handle? l Vectored Interrupts - each interrupt includes address of device l Polled Interrupts - general interrupt signal and system polls devices to determine source l Priorities Interrupts - interrupts have assigned priorities

31 Vectored Interrupt Processing

32 Polled Interrupt Processing

33 Priorities Interrupt

34 Processing an IBM S/390 Interrupt

35 DMA - Direct Memory Access l Impractical to transfer data from peripheral device to CPU via programmed I/O - ties up CPU l DMA Purpose: to transfer large blocks of data directly from disk to memory l Faster mode of transfer l CPU starts process and then is free to perform other tasks l Transfer is under control of the I/O module l CPU is interrupted when I/O transfer is complete

36 Information Needed for DMA l Location of the data on the I/O device l Starting location of the block of data in memory l Size of the block to be transferred l Direction of transfer - read or write l BOTTOM LINE - CPU is free to perform other tasks while high speed data transfer is taking place

37 DMA Initiation and Control

38 Interconnection: CPU, Memory, I/O

39 External Interface Busses and Ports l A port is a connector at the end of a bus into which a peripheral device can be plugged l Control of the port is provided by a port controller connected to a standard bus (PCI or ISA) l Device control is built into a controller within the device and into software (drivers) that are installed in the OS l Common interface busses: USB, SCSI, IEEE 1394

40 USB - Universal Serial Bus l Newer bus intended to replace the standard serial port l Faster - capable of transfers up to 12 megabits per second l Hubs can provide multiple connection points for I/O devices l Devices can be added without rebooting l Still for slow to medium devices, such as keyboards, scanners, joysticks and cameras

41 USB Topology Example

42 FireWire Configuration

43 Typical PC Bus Interface

Download ppt "Chapter 8 Input/Output. Busses l Group of electrical conductors suitable for carrying computer signals from one location to another l Each conductor in."

Similar presentations

Ads by Google