CO44
CO44
Input Devices:
The input devices is defined as it converts incoming data and instructions into
a pattern of electrical signals in binary code that are comprehensible to a
digital computer.
Example: keyboard, mouse, scanner etc.
Output Devices:
An output device is generally reverse of the input process and generally
translating the digitized signals into a form intelligible to the user. The output
device is also performed for sending data from one computer system to
another. For some time punched-card and paper-tape readers were extensively
used for input, but these have now been supplanted by more efficient devices.
Example: monitors, headphones, printers etc.
Storage Devices:
Storage devices are used to store data in the system which is required for
performing any operation in the system. The storage device is one of the most
requirement devices and also provide better compatibility. Example: hard disk,
magnetic tape, flash memory etc.
Advantage of Peripherals Devices:
Peripherals devices provides more feature due to this operation of the system is
easy. These are given below:
Interrupt
In computer architecture, an interrupt is a signal to the processor emitted by
hardware or software indicating an event that needs immediate attention.
Our processor repeatedly keeps on checking for the SIN and SOUT bits for the
synchronization in the program. Hence, the processor does not do any things
useful other than running the infinite loop. To avoid this situation input/output
device can have the concept of interrupts . When the input/output device is ready
it could signal the processor on a separate line called interrupt request line. On
receiving the interrupt the processor reads the input output device and hence
removing the infinite loop waiting mechanism.
Type of Interrupts
2. Software Interrupts: Software interrupt can also divided in to two types they
are
Step 2: When the interrupt occurs the program counter value is stored on
the processes stack.
Step 3: The program counter is now loaded with the address of interrupt
service routine.
Step 4: Once the interrupt service routine is completed the address on the
processes stack is pop and place back in the program counter.
Data transfer to and from the peripherals may be done in any of the three
possible ways:
1. Programmed I/O.
2. Interrupt- initiated I/O.
3. Direct memory access( DMA)
4. I/O Channels and Processors
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.
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.
Note: Both the methods programmed I/O and Interrupt-driven I/O require the
active intervention of the processor to transfer data between memory and the
I/O module, and any data transfer must transversea path through the
processor. Thus both these forms of I/O suffer from two inherent drawbacks.
Bus Request : It is used by the DMA controller to request the CPU to relinquish
the control of the buses.
Bus Grant : It is activated by the CPU to Inform the external DMA controller that
the buses are in high impedance state and the requesting DMA can take control
of the buses. Once the DMA has taken the control of the buses it transfers the
data. This transfer can take place in many ways.
DMA Configurations
Processor does not execute I/O instructions itself – processor initiates I/O
transfer by instructing the I/O channel to execute a program in memory
Error condition actions
Selector channel
There are many serial data transfer protocol. The protocol serial data transfer can
be grouped into two types: synchronous and asynchronous . For synchronous
data transfer, both the sender and receiver access the data according to the same
clock. Therefore , a special line for the clock signal is required. A master (or one of
the senders) should provide the clock signal to all the receivers in the
synchronous data transfer
Asynchronous Transmission