Handshaking 2.3.
In a normal lifestyle, handshaking resembles establishing communication or a friendly bond
between two people. In terms of the computer system also, it means somewhat the same.
Through handshaking, a communication link is established between two different
components of a computer. This communication is the transfer of data.
So, in the handshaking process, first, a strobe signal is sent by the source channel to the
destination. Then, the destination sends back the acknowledgment that the signal has been
received with a signal informing whether the destination channel is free or not for receiving
the data. By following these steps, communication is established between the sender and the
receiver ends and then the further transfer of data takes place within the two through the data
bus.
It should be noted here that although this handshaking may look similar to the three-way
handshaking process between different networks, here the case is different. Here, the
communication is being done within the different components of the same system which are
connected via physical means (through cables and cords). However, there may exist wireless
communication between the components of the same system also as we have emerging
technologies every day.
Types of handshaking process
There are two types of handshaking process:
1. Source Initiated Handshaking
2. Destination Initiated Handshaking
1) Source Initiated Handshaking Process
In the source Initiated the handshaking process, the source initiated the process of
establishing the connection. This means that, in this process, the sender needs to send the data
and so the handshaking process is initiated by the sender. So, in this process, after sending the
valid data, the receiver sends the acknowledgment that the data has been received. Hence, the
signals 'DATA VALID' is sent by the sender before sending the data and the signal 'DATA
ACCEPTED' is sent by the receiver after getting the data.
2) Destination Initiated Handshaking Process
In the destination Initiated the handshaking process, the process of establishing the
connection is initiated by the destination. What this means is that, in this process, the receiver
needs to receive the data form the sender, hence the handshaking process is initiated by the
receiver. So, in this process, the receiver has to first send the request signal to the source
channel. After that, the source sends the 'DATA VALID' signal before sending the data and
the receiver then again sends a signal 'DATA ACCEPTED' after the data is received by it.
Handshaking
Handshaking is an I/O control approach to synchronize I/O devices with the microprocessor.
As several I/O devices accept or release data at a much lower cost than the microprocessor,
this technique is used to control the microprocessor to operate with an I/O device at the I/O
devices data transfer rate.
The drawback of the strobe approach is that the source unit that starts the transfer has no
method of knowing whether the destination unit has received the data element that was
located in the bus. A destination unit that initiates the transfer has no method of knowing
whether the source unit has located the information on the bus.
The handshake approach solves this issue by introducing a second control signal that
supports a response to the unit that initiates the transfer. The basic feature of the two-wire
handshaking approach of data transfer is as follows. One control line is in an equal direction
as the data flow in the bus from the source to the destination.
It is used by the source unit to update the destination unit whether there are true data in the
bus. The other control line is in the other direction from the destination to the source. It is
used by the destination unit to update the source whether it can accept information. The
sequence of control during the transfer is based on the unit that initiates the transfer.
The diagram shows the data transfer process when initiated by the source. The two
handshaking lines are data valid, which is created by the source unit, and data accepted,
created by the destination unit. The timing diagram displays the exchange of signals between
the two units
The sequence of events showed in part (c) shows the four possible states that the system can
be at any given time. The source unit initiates the transfer by locating the information on the
bus and enabling its data valid signal. The data accepted signal is activated by the destination
unit after it obtains the data from the bus.
The destination-initiated transfer using handshaking lines is shown in the figure. The name
of the signal created by the destination unit has been modified to ready for data to reflect its
new definition. The source unit in this case does not locate data on the bus until after it takes
the ready-for-data signal from the destination unit.
The sequence of events in both cases would be equal if it can consider the ready-for-data
signal as the complement of data accepted. The only difference between the source-initiated
and the destination-initiated transfer is in their choice of the initial state.
References
Reference Books:
J.P. Hayes, “Computer Architecture and Organization”, Third Edition.
Mano, M., “Computer System Architecture”, Third Edition, Prentice Hall.
Stallings, W., “Computer Organization and Architecture”, Eighth Edition, Pearson
Education.
Text Books:
Carpinelli J.D,” Computer systems organization &Architecture”, Fourth Edition,
Addison Wesley.
Patterson and Hennessy, “Computer Architecture”, Fifth Edition Morgaon Kauffman.
Other References
What is Handshaking? (tutorialspoint.com)
Handshaking in Computer architecture (includehelp.com)