Coa Assignment - 04: Q.1What Are Major Functions or Requirements For An I/O?
Coa Assignment - 04: Q.1What Are Major Functions or Requirements For An I/O?
ROLL no-09
COA ASSIGNMENT - 04
Q.1What are major functions or requirements for an I/O?
Ans. The major functions of an I/O module are as follows:
Control and Timing: This function is used for synchronizing the traffic flow between an external device
and an internal resource. In order to understand how this function works, consider the following example
wherein the transfer of data between an external device and a processor is controlled.
Step 3- Requesting transfer of data by a processor to an I/O module using a command. This step can be
performed only when the device is operational and can readily transmit.
When a bus is used by the system, then every interaction occurred between a processor and an I/O
module contains either one or more than one bus arbitration.
Decoding commands: The commands are retrieved by I/O module from the processor and then
transmitted onto the control bus as signals.
Abhinav Arora
ROLL no-09
Example: Following are the commands which an I/O module of the disk drive can receive
a. Write sector
b. READ sector
c. SCAN record ID
d. SEEK track number
The commands SEEK track number and SCAN record ID contains a parameter which is transmitted on to
the data bus.
Exchanging Data: The data is exchanged using a data bus between a processor and an I/O module.
Reporting status: It gives the knowledge regarding the status of an I/O module since the working of
peripherals is quite slow.
Example: In few cases, the I/O module might not be ready to transfer the data to the processor, as it may
be busy in executing the previous I/O command. Such a condition can be indicated using common status
signals lie READY and BUSY.
Identifying Address: Every I/O device is associated with a unique address. Therefore, an I/O module
has to identify the peripherals associated with it using their unique addresses.
Device Communication: This function contains data, commands and status information. An I/O module
should be capable enough of performing this function.
Data Buffering: This function is one of the most prominent task of an I/O module. The rate at which the
data is transferred in or out of the processor is very high. However, in case of peripheral devices,
although the orders of magnitude is less, it still contains a wide range. The data which is retrieved from
the processor is transmitted to an I/O, module in an instantaneous break. Buffering of this data is done
and it is transmitted at its data rate to a peripheral device. Whereas in the other case, buffering of data is
done to avoid the tie up of memory in terms of a slow transfer operation. Therefore an I/O module should
be capable of operating at the speeds of both memory and device. In case if the operating speed of an I/O
device is greater than the speed of memory access, then the buffering operation required is performed by
the I/O module.
Error Detection: This function of an I/O module is used for both detecting and reporting errors to a
processor. Generally, there are two classes of errors. The first class comprises of electrical and
mechanical malfunctions, which are identified by the device. The second class includes the unintentional
changes made to the bit pattern while it is being transferred from the device to an I/O module. This type
of transmission errors can be identified using any form of error-detecting code.
Example: An IRA character code covers almost 7 bits of a byte, leaving 8 th bit vacant. This eighth bit
must be set in such a way that the total number of 1’s in the byte is either an even parity or an odd parity.
On receiving this byte the parity is checked by an I/O module for identifying the occurrence of any error.
Abhinav Arora
ROLL no-09
Interrupt Processing:
A device driver initiates an I/O request on behalf of a process.
The device driver signals the I/O controller for the proper device, which initiates the requested I/O.
The device signals the I/O controller that is ready to retrieve input, the output is complete or that an error
has been generated.
The CPU receives the interrupt signal on the interrupt-request line and transfer control over the interrupt
handler routine.
Abhinav Arora
ROLL no-09
The interrupt handler determines the cause of the interrupt, performs the necessary processing and executes
a “return from” interrupt instruction.
The CPU returns to the execution state prior to the interrupt being signaled.
The CPU continues processing until the cycle begins again.
Abhinav Arora
ROLL no-09
1. Centralized bus arbitration – A single bus arbiter performs the required arbitration.
2. Distributed bus arbitration – All devices participate in the selection of the next bus master.
Advantages –
Simplicity and Scalability.
The user can add more devices anywhere along the chain, up to a certain maximum value.
Disadvantages –
The value of priority assigned to a device is depends on the position of master bus.
Propagation delay is arises in this method.
If one device fails then entire system will stop working.
Advantages –
This method does not favor any particular device and processor.
The method is also quite simple.
If one device fails then entire system will not stop working.
Disadvantages –
Adding bus masters is different as increases the number of address lines of the circuit.
Advantages –
This method generates fast response.
Disadvantages –
Hardware cost is high as large no. of control lines are required.