Coa Unit 5
Coa Unit 5
Peripheral Device :
The device which are connected to computer are called peripheral devices.
Pheripheral devices are either input device, output device or both.
It can be connected to your computer via USB port, serial port, parallel port, specialized
network card, or Ethernet network.
These devices are considered to be the part of computer system.
There are three types of peripherals :
1. Input peripherals : Example : Keyboard, Mouse etc.
2. Output peripherals: Example: Printer, Monitor etc
3. Input-Output peripherals: Example: Touch screen etc.
Unit – 0 5 : I/O Organization
Interfaces
Interface shared boundary between two separate components of the computer system.
It can be used to attach two or more components to the system for communication purposes.
Unit – 0 5 : I/O Organization
Input-Output Interface
Peripherals connected to a computer need special communication links
for interfacing with CPU.
In computer system, there are special hardware components between the
CPU and peripherals to control or manage the input-output transfers.
These components are called input-output interface units because
they provide communication links between processor bus and
peripherals.
They provide a method for transferring information between internal
system and input-output devices.
Unit – 0 5 : I/O Organization
Modes of Data Transfer from I/O to memory :
Data transfer between CPU and the I/O devices may be done in different modes.
1. Programmed I/O.
2. Interrupt- initiated I/O.
3. Direct memory access(DMA).
Programmed I/O :
It was the most simple type of I/O technique for the exchanges of data.
It is used to transfer data between the processor and the external devices.
The processor executes a program that gives it direct control of the I/O
operation, sending a read or write command, and transferring the data.
When the processor issues a command to the I/O module, it must wait
until the I/O operation is complete.
If the processor is faster than the I/O module, this is wasteful of
processor time.
Unit – 0 5 : I/O Organization
Interrupt- initiated I/O :
This mode uses an interrupt facility to inform the interface to issue.
CPU can do any other work until it is interrupted.
This mode is faster than programmed I/O module.
The performance of the system is enhanced to some extent.
1. What is Interrupt ?
2. Priority Interrupt :
3. Interrupt Handling :
Types of interrupts :
There are two types of interrupts:
1. Hardware Interrupts
2. Software Interrupts
Hardware Interrupts :
When the signal for the processor is from hardware then this interrupts is
known as hardware interrupt.
Hardware interrupt can be of two types:
Unit – 0 5 : I/O Organization
Maskable Interrupt
The hardware interrupts which can be delayed when a much high priority interrupt has occurred at the
same time.
Non Maskable Interrupt
The hardware interrupts which cannot be delayed and should be processed by the processor immediately.
Software Interrupts :
The interrupt that is caused by any internal system of the computer
system is known as a software interrupt. It can also be of two types:
Normal Interrupt
The interrupts that are caused by software instructions are
called normal software interrupts.
Exception
Unplanned interrupts which are produced during the execution of
some program are called exceptions, such as division by zero.
Unit – 0 5 : I/O Organization
Priority Interrupt :
A priority interrupt is a interrupt that has the higher priority to the other
interrupts.
Generally, devices with high speed transfer such as magnetic disks are given
high priority and slow devices such as keyboards are given low priority.
The system has authority to decide which conditions are allowed to
interrupt the CPU, while some other interrupt is being serviced.
When two or more devices interrupt the computer simultaneously, the
computer services the device with the higher priority first.
Unit – 0 5 : I/O Organization
Interrupt Handling :
The interrupt handler is a program that is used to handle the interrupts in
computer system.
If there is an interrupt present then the handler will stop the present
instruction.
After processing the interrupt by the processor interrupt handler will load
the instruction and the process will start its processing.
The interrupt handler is also called as Interrupt service routine (ISR).
There are different types of interrupt handler which will handle different
interrupts.
1. First Level Interrupt Handler (FLIH) is hard interrupt handler or fast
interrupt handler.
2. Second Level Interrupt Handler (SLIH) is soft interrupt handler and
slow interrupt handler.
Unit – 0 5 : I/O Organization
Synchronous and Asynchronous Data Transfer
Unit – 0 5 : I/O Organization
Synchronous Data Transfer
In synchronous data transfer, the transmitter and the receiver are synchronized and uses a common
timing signal.
It uses timing signals for synchronization.
Here, the data flows as a continuous stream one after the other.
There are no gaps between data.
In this method, the timing signals must be accurate to transfer data efficiently.
This method is faster than asynchronous data transferring.
Unit – 0 5 : I/O Organization
Asynchronous Data Transfer
In asynchronous data transfer, the transmitter and receiver operate at different clock frequencies.
It uses the start and stop bits to the data.
The ‘0’ indicates the start bit while ‘1’ indicates the end bit.
Timing is not an important factor in asynchronous data transfer.
Unit – 0 5 : I/O Organization
Unit – 0 5 : I/O Organization