Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 10 Input/Output Organization

Similar presentations


Presentation on theme: "Chapter 10 Input/Output Organization"— Presentation transcript:

1 Chapter 10 Input/Output Organization
Victor Cheung Pages

2 Why do we need I/O? Computers need some way to interact with the outside world. I/O allows a computer to communicate with devices such as a monitor, keyboard, mouse, disk drives, etc.

3 Special Terms Source - CPU/main computer
Destination - a peripheral or device Strobe - an oscillating signal/clock

4 2 Types of Data Transfers -Synchronous -Asynchronous Programmed I/O
Introduction 2 Types of Data Transfers -Synchronous -Asynchronous Programmed I/O

5 Synchronous Data Transfers
Recall that an I/O device and CPU communicate via address bus, data bus, and control bus.

6 Synchronous Interface
The I/O device reads in the address bus from the CPU The data bus is bi-directional, or data my flow in one direction. The control bus may only have data flowing in one direction.

7 Connections between a CPU and I/O device with a synchronous data transfer

8 Synchronous data transfers are used when peripherals are located within the same computer as the CPU. This allows them to share a common clock, and physically shortens the time that data has to travel because of their close proximity to the CPU.

9 Asynchronous Data Transfers
Use control signals and their hardware to move data. This does not require the source and destination to use the same clock. 4 types of asynchronous data transfers: -Source Initiated -Destination Initiated -Handshaking -Non-handshaking

10 Asynchronous Data Transfers: Source-Initiated Data Transfer w/o handshaking
In this mode: 1. The source outputs data 2. Source strobes a control signal for a set time 3. Destination reads in data 4. Source deasserts the strobe The destination device does not send any information back to the source, so the destination device can never confirm that the data was received.

11 This is analogous to having a teacher (the source) write an assignment on the blackboard (the data) and the students (the destination) read the blackboard without letting the teacher know if they understood what the teacher wrote.

12 Asynchronous Data Transfers: Source-Initiated Data Transfer w/o handshaking

13 Asynchronous Data Transfers: Destination-Initiated Data Transfer w/o handshaking
In this mode: 1. The destination device outputs data to the source 2. Source makes data available after delay 3. Destination reads in data 4. Destination deasserts the strobe This causes the source to stop transmitting valid data

14 This is similar to having a student (the destination) ask a teacher (the source) a question. The teacher gives the student an answer (the data) and then continues lecturing without confirming whether or not the student heard the answer.

15 Asynchronous Data Transfers: Destination-Initiated Data Transfer w/o handshaking

16 Usefulness These types of data transfers are only useful for low cost devices that do not have to confirm receipt of data, and have transfers that occur periodically. But some other devices do not require periodic data transfers. These type of devices may use handshaking to coordinate their transfers instead.

17 Handshaking Handshaking uses another control signal to confirm that data has been read in or that data is ready.

18 Asynchronous Data Transfers: Source-Initiated Data Transfer w/ handshaking
In this mode: 1. The source sets a data request 2. Source makes valid data available 3. Destination reads in data after delay 4. Destination sends a data acknowledge signal to the source (This tells the source that the device has read in the data, and that the data is no longer needed.) 5. The source stops sending data 6. Destination resets acknowledge signal

19 This is analogous to having a teacher write something on a blackboard and then waits for the students to say that they have copied down what he has written. After the students confirm that they have copied down everything, the teacher erases the information on the blackboard and continues lecturing.

20 Asynchronous Data Transfers: Source-Initiated Data Transfer w/ handshaking

21 Asynchronous Data Transfers: Destination-Initiated Data Transfer w/ handshaking
In this mode: 1. The destination device outputs data to the source 2. Source makes valid data available 3. Destination reads in data after delay 4. Destination sends a data ready signal to the source 5. The source stops sending data 6. Destination resets ready signal

22 This is similar to having the students ask the teacher a question
This is similar to having the students ask the teacher a question. The teacher answers the question by writing the answer on the blackboard. The students copy the answer in their notes and let the teacher know that they are done writing it down. The teacher then erases the blackboard and continues the lecture.

23 Asynchronous Data Transfers: Destination-Initiated Data Transfer w/ handshaking

24 Programmed I/O All I/O devices require software for the CPU to input and output data. This software is called a driver.

25 Drivers Drivers are usually written in Assembly or C. Programmers use these languages because they have more access to memory manipulation. A language such as Java, cannot write driver software because the compiler does not allow the programmer to manipulate the memory.

26 Improvements to I/O There are several methods to improve I/O performance, such as interrupts, direct memory access, and I/O processors. The two popular I/O interfaces today are the RS-232-C serial interface and the universal serial bus (USB).

27 THE END


Download ppt "Chapter 10 Input/Output Organization"

Similar presentations


Ads by Google