0% found this document useful (0 votes)
21 views16 pages

Mod 4

Uploaded by

ythombare2000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views16 pages

Mod 4

Uploaded by

ythombare2000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

What Is an I/O Module?

An I/O module — also known as an input/output module — allows for communication


between a computer system and a peripheral device. Some examples of peripheral
devices include graphics cards, image scanners, digital cameras, speakers and
microphones.
This type of processor communication between devices increases a computer’s
capabilities, enabling an operating system to connect with the external world.
WHAT IS AN I/O MODULE?
Input/Output Modules, or I/O Modules, manage the communication between a CPU and a network, including
the transfer of data, the management of power loads, and the control of machine functions.

This enables system integrators to connect disparate devices, allowing greater control of the industrial
network. I/O modules are especially helpful in instances where there exists legacy machinery, devices, and
systems that are unable to natively communicate with a desired industrial protocol.

I/O modules help to extend a manufacturer's network to incorporate all manufacturing equipment, enabling
greater control of the system as well as increased operational visibility. They also overcome the challenge of
collecting peripheral data, which can come in various amounts, at different speeds, and in varying formats.
Some of the devices from which data can be collected using an I/O module include sensors, actuators,
monitors, and valves. I/O modules can also work as accessory devices for PLCs and HMIs.
WHAT ARE THE CORE FUNCTIONS OF AN I/O MODULE?
I/O modules offer a variety of key functions within an industrial environment. Without Input/Output modules, organizations
would be unable to exchange data between peripheral devices and their network. Below we outline the critical functionality
of I/O modules:
•Detecting Errors: I/O modules have the ability to detect errors and report them to the CPU. One way that I/O modules detect
errors is with the parity bit method.
•Processor Communication: This critical function of an I/O module involves a few components:
• Command Decoding: Receive and decode commands sent from the processor.
• Data Exchange: Exchange data between peripherals, processors, and the main memory.
• Status Reporting: Communicate the status of peripherals to the processor.
• Address Decoding: Organizes each of the peripherals connected to the I/O module by managing their unique
addresses.
•Buffering Data: With data buffering, I/O modules can manage the transfer speed of data sent by the processor to peripheral
devices. This compensates for the latency of peripheral devices.
•Device Communication: I/O modules can facilitate communication between connected peripheral devices.
•Control and Timing: I/O modules are designed to manage the data transactions between the internal system and peripheral
devices.
WHAT ARE THE DIFFERENT TYPES OF I/O COMMUNICATION TECHNIQUES?
There are three types of I/O communication techniques:
1.Programmed I/O: In this case, the transfer of data from an I/O device to the memory will require the CPU to
initiate a program. The CPU remains in a loop until the I/O device is prepared to make the data transfer.
2.Interrupt Driven I/O: In this case, the CPU offers a read command to the I/O device and once the I/O
device is prepared to transfer data, it sends an interrupt signal to the processor. Upon this event, the CPU
then checks the status of the device and will write that information into the memory if it is ready.
3.Direct Memory Access (DMA): In this communication technique, the I/O device can both send and receive
data directly from the memory, bypassing the CPU altogether and enhancing the speed of memory
operations.
1.Programmed I/O:
It is due to the result of the I/O instructions that are written in the computer program.
Each data item transfer is initiated by an instruction in the program.
Usually the transfer is from a CPU register and memory. In this case it requires constant monitoring by the
CPU of the peripheral devices.
Example of Programmed I/O:
In this case, the I/O device does not have direct access to the memory unit.
A transfer from I/O device to memory requires the execution of several instructions by the CPU, including an
input instruction to transfer the data from device to the CPU and store instruction to transfer the data from
CPU to memory.
In programmed I/O, the CPU stays in the program loop until the I/O unit indicates that it is ready for data
transfer.
This is a time consuming process since it needlessly keeps the CPU busy. This situation can be avoided by
using an interrupt facility. This is discussed below.
•Programmed I/O is utilized when there is a need to transfer data between
the CPU and I/O, and the data transfer is managed through program
instructions.
•In the context of computer programming languages such as C++,
Programmed I/O operations result from I/O instructions embedded in the
computer program. Examples of such instructions include those for input
(e.g., cin) and output (e.g., cout).
•Each data transfer in Programmed I/O is initiated by an I/O instruction
within the program, typically to access registers or memory on a specific
device.
•Executing data transfers under program control demands continuous
monitoring of I/O devices by the CPU.
2.Interrupt- initiated I/O:
Since in the above case we saw the CPU is kept busy unnecessarily.
This situation can very well be avoided by using an interrupt driven method for data transfer.
By using interrupt facility and special commands to inform the interface to issue an interrupt request signal
whenever data is available from any device.
In the meantime the CPU can proceed for any other program execution.
The interface meanwhile keeps monitoring the device.
Whenever it is determined that the device is ready for data transfer it initiates an interrupt request signal to the
computer.
Upon detection of an external interrupt signal the CPU stops momentarily the task that it was already
performing, branches to the service program to process the I/O transfer, and then return to the task it was
originally performing.
The processor is tied up in managing an I/O transfer; a number of instructions must be executed for each I/O
transfer.
•Interrupt Initiated I/O was introduced to address the polling-related
issue present in Programmed I/O.
•An interrupt is a high-priority signal, generated either by an external
device or some software, designed to immediately capture the CPU's
attention. The use of interrupts aims to eliminate the waiting period
inherent in Programmed I/O.
•In Interrupt Initiated I/O, instead of the CPU continuously monitoring,
the interface is informed to issue an interrupt request signal when data
becomes available from the device.
•Meanwhile, the CPU proceeds to execute other programs while the
interface keeps monitoring the device.
•When the device is ready for data transfer, it generates an interrupt
request.
•Upon detecting the external interrupt signal, the CPU interrupts its
current task, processes the I/O data transfer, and then resumes the
original task it was performing.
3.Direct Memory Access :
The data transfer between a fast storage media such as magnetic disk and memory unit is limited by the
speed of the CPU. Thus we can allow the peripherals directly communicate with each other using the
memory buses, removing the intervention of the CPU. This type of data transfer technique is known as DMA or
direct memory access. During DMA the CPU is idle and it has no control over the memory buses.
The DMA controller takes over the buses to manage the transfer directly between the I/O devices and the
memory unit.
3. Bus grant request time.
4. Transfer the entire block of data at transfer rate of device because the device is usually slow than the
speed at which the data can be transferred to CPU.
5. Release the control of the bus back to CPU So, total time taken to transfer the N bytes = Bus grant request
time + (N) * (memory transfer rate) + Bus release control time.
•DMA is employed when large blocks of data need to be transferred
between the CPU and I/O devices, rendering Programmed or
Interrupt Initiated I/O less efficient.
•For high-speed transfers of substantial data blocks between external
devices and main memory, the DMA approach is often utilized.
•In other transfer modes, memory is accessed indirectly through the
CPU. However, when transferring significant data blocks and
frequently utilizing the CPU before memory access, this process
becomes time-consuming. DMA addresses this by allowing direct
communication between I/O devices and memory, minimizing CPU
intervention.
•DMA permits data transfer directly between the I/O device and main
memory with minimal CPU involvement.
•In DMA, the CPU grants the I/O interface the authority to read from
or write to memory without direct CPU intervention.
•The DMA controller autonomously manages data transfer between
main memory and the I/O device.
•The CPU is only involved at the beginning and end of the transfer
and is interrupted only after the entire block has been successfully
transferred.
Advantages:
Standardization: I/O interfaces provide a standard way of communicating with external devices. This means
that different devices can be connected to a computer using the same interface, which makes it easier to swap
out devices and reduces the need for specialized hardware.
Modularity: With I/O interfaces, different devices can be added or removed from a computer without
affecting the other components. This makes it easier to upgrade or replace a faulty device without affecting
the rest of the system.
Efficiency: I/O interfaces can transfer data between the computer and the external devices at high speeds,
which allows for faster data transfer and processing times.
Compatibility: I/O interfaces are designed to be compatible with a wide range of devices, which means that
users can choose from a variety of devices that are compatible with their computer’s I/O interface.
Disadvantages:
Cost: I/O interfaces can be expensive, especially if specialized hardware is required to connect a particular
device to a computer system.
Complexity: Some I/O interfaces can be complex to configure and require specialized knowledge to set
up and maintain. This can be a disadvantage for users who are not familiar with the technical aspects of
computer hardware.
Compatibility issues: While I/O interfaces are designed to be compatible with a wide range of devices,
there can still be compatibility issues with certain devices. In some cases, device drivers may need to be
installed to ensure proper functionality.
Security risks: I/O interfaces can be a security risk if they are not properly configured or secured.
Hackers can exploit vulnerabilities in I/O interfaces to gain unauthorized access to a computer system or
steal data.
The Benefits of I/O Modules
There are a few different types of I/O modules, and they all play a necessary role in any
effective operating system. I/O modules can be beneficial in a programmable logic controller
(PLC) and other operating systems because they can:
•Decrease hardware expenses.
•Save control cabinet space.
•Be installed remotely.
•Simplify wiring and cable setup.
•Clear hardware savings.
•Increase organization.
Programmed I/O Between Programmed andInterrupt
Difference InterruptInitiated
InitiatedI/O
I/O
Data transfer is initiated by the means of
instructions stored in the computer program.
The I/O transfer is initiated by the interrupt
Whenever there is a request for I/O transfer
command issued to the CPU.
the instructions are executed from the
program.

There is no need for the CPU to stay in the


The CPU stays in the loop to know if the
loop as the interrupt command interrupts the
device is ready for transfer and has to
CPU when the device is ready for data
continuously monitor the peripheral device.
transfer.

This leads to the wastage of CPU cycles as The CPU cycles are not wasted as CPU co
CPU remains busy needlessly and thus the ntinues with other work during this time and
efficiency of system gets reduced. hence this method is more efficient.

CPU cannot do any work until the transfer is CPU can do any other work until it is
complete as it has to stay in the loop to interrupted by the command indicating the
continuously monitor the peripheral device. readiness of device for data transfer

Its module is faster than programmed I/O


Its module is treated as a slow module.
module.
https://edurev.in/t/97671/IO-modules-Computer-Organization
-and-Architecture

You might also like