0% found this document useful (0 votes)
29 views28 pages

Asynchronous

The document discusses the importance of Input/Output (I/O) in computer systems, explaining how it enables communication between the CPU and peripheral devices. It details two types of data transfers: synchronous and asynchronous, along with their mechanisms and use cases. Additionally, it highlights the role of drivers in I/O operations and mentions methods to improve I/O performance.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views28 pages

Asynchronous

The document discusses the importance of Input/Output (I/O) in computer systems, explaining how it enables communication between the CPU and peripheral devices. It details two types of data transfers: synchronous and asynchronous, along with their mechanisms and use cases. Additionally, it highlights the role of drivers in I/O operations and mentions methods to improve I/O performance.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd

Input/Output Organization

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.
Special Terms
Source - CPU/main computer
Destination - a peripheral or device
Strobe - an oscillating signal/clock
• Storage (such as memory and CPU registers) and external I/O devices
• Resolves the differences between the computer and peripheral devices
Peripherals
Electromechanical Devices
CPU or Memory
Electronic Device
Data Transfer Rate
Peripherals
Usually slower
CPU or Memory
Usually faster than peripherals
Some kinds of Synchronization mechanism may be needed
Unit of Information
Peripherals
Byte, Block, ...
CPU or Memory
Word
Data representations may differ
Introduction

2 Types of Data Transfers


-Synchronous
-Asynchronous

Programmed I/O
Synchronous Data Transfers

Recall that an I/O device and CPU


communicate via address bus, data bus,
and control bus.
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.
Connections between a CPU and I/O device
with a synchronous data transfer
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.
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
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.
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.
Asynchronous Data Transfers:
Source-Initiated Data Transfer
w/o handshaking
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
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.
Asynchronous Data Transfers:
Destination-Initiated Data Transfer
w/o handshaking
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.
Handshaking

Handshaking uses another control signal


to confirm that data has been read in or
that data is ready.
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
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.
Asynchronous Data Transfers:
Source-Initiated Data Transfer
w/ handshaking
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
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.
Asynchronous Data Transfers:
Destination-Initiated Data Transfer
w/ handshaking
Programmed I/O
All I/O devices require software for the CPU
to input and output data. This software is
called a driver.
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.
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).
THE END

You might also like