Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
51 views

Coa Assignment - 04: Q.1What Are Major Functions or Requirements For An I/O?

The document discusses the functions and requirements of an input/output (I/O) module. It describes the major functions of an I/O module as control and timing, processor communication, device communication, data buffering, and error detection. It then provides details about each function and examples. The document also explains interrupt-driven I/O and the basic operations and processing of interrupts. Finally, it defines bus arbitration as the process of determining which bus master will access the bus and describes different bus arbitration methods like daisy chaining, polling/rotating priority, and fixed priority.

Uploaded by

Abhinav arora
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views

Coa Assignment - 04: Q.1What Are Major Functions or Requirements For An I/O?

The document discusses the functions and requirements of an input/output (I/O) module. It describes the major functions of an I/O module as control and timing, processor communication, device communication, data buffering, and error detection. It then provides details about each function and examples. The document also explains interrupt-driven I/O and the basic operations and processing of interrupts. Finally, it defines bus arbitration as the process of determining which bus master will access the bus and describes different bus arbitration methods like daisy chaining, polling/rotating priority, and fixed priority.

Uploaded by

Abhinav arora
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Abhinav Arora

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:

1. Control and Timing


2. Processor Communication
3. Device communication
4. Data buffering
5. Error Detection

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.

The following steps are involved in this process.

Step 1- Examining I/O module to verify the status of an attached device.

Step 2- Returning the status of attached device.

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.

Step 4- Acquiring a single unit of data from an external device.

Step 5-Transferring the data from an I/O module to the processor.

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.

Processor Communication: This function performs the following operations:

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

Q.2 Explain interrupt Driven I/O?


Ans. Interrupt driven I/O is an alternative scheme dealing with I/O. Interrupt I/O is a way of controlling
input/output activity whereby a peripheral or terminal that needs to make or receive a data transfer sends
a signal. This will cause a program interrupt to be set. At a time appropriate to the priority level of the I/O
interrupt. Relative to the total interrupt system, the processors enter an interrupt service routine. The
function of the routine will depend upon the system of interrupt levels and priorities that is implemented
in the processor. The interrupt technique requires more complex hardware and software, but makes far
more efficient use of the computer’s time and capacities.

Simple Interrupt Processing

Basic Operations of Interrupt:

1. CPU issues read command.


2. I/O module gets data from peripheral whilst CPU does other work.
3. I/O module interrupts CPU.
4. CPU requests data.
5. I/O module transfers data.

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

Q.3What is the purpose of bus arbitration?


Ans. Bus Arbitration refers to the process by which the current bus master accesses and then leaves the
control of the bus and passes it to another bus requesting processor unit. The controller that has access to
a bus at an instance is known as Bus master.
A conflict may arise if the number of DMA controllers or other controllers or processors try to access the
common bus at the same time, but access can be given to only one of those. Only one processor or
controller can be Bus master at the same point of time. To resolve these conflicts, Bus Arbitration
procedure is implemented to coordinate the activities of all devices requesting memory transfers. The
selection of the bus master must take into account the needs of various devices by establishing a priority
system for gaining access to the bus. The Bus Arbiter decides who would become current bus master.
There are two approaches to bus arbitration:

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.

Methods of BUS Arbitration –

There are three bus arbitration methods:


(i) Daisy Chaining method –
It is a centralized bus arbitration method. During any bus cycle, the bus master may be any device – the
processor or any DMA controller unit, connected to the bus.

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.

(ii) Polling or Rotating Priority method –


In this method, the devices are assigned unique priorities and complete to access the bus, but the
priorities are dynamically changed to give every device an opportunity to access the bus.
Abhinav Arora
ROLL no-09

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.

iii) Fixed priority or Independent Request method –


In this method, the bus control passes from one device to another only through the centralized bus arbiter.

Advantages –
 This method generates fast response.
Disadvantages –
 Hardware cost is high as large no. of control lines are required.

You might also like