I/O Interface (Interrupt & DMA Mode) | Computer Architecture & Organisation (CAO) - Computer Science Engineering (CSE) PDF Download


I/O Interface (Interrupt and DMA Mode)

The method that is used to transfer information between internal storage and external I/O devices is known as I/O interface. The CPU is interfaced using special communication links by the peripherals connected to any computer system. These communication links are used to resolve the differences between CPU and peripheral. There exists special hardware components between CPU and peripherals to supervise and synchronize all the input and output transfers that are called interface units.

Mode of Transfer:

The binary information that is received from an external device is usually stored in the memory unit. The information that is transferred from the CPU to the external device is originated from the memory unit. CPU merely processes the information but the source and target is always the memory unit. Data transfer between CPU and the I/O devices may be done in different modes.

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).

Now let’s discuss each mode one by one.

  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.
     
  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.
     
  3. Direct Memory AccessThe 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.

I/O Interface (Interrupt & DMA Mode) | Computer Architecture & Organisation (CAO) - Computer Science Engineering (CSE)

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.

Example it can transfer using
Bus Transfer : In which a block sequence consisting of memory words is transferred in a continuous burst where the DMA controller is the master of the memory buses. This mode is needed for fast devices like magnetic disks.

Cyclic Stealing : In this DMA controller transfers one word at a time after which it must return the control of the buses to the CPU. The CPU merely delays its operation for one memory cycle to allow the direct memory I/O transfer to “steal” one memory cycle.

The document I/O Interface (Interrupt & DMA Mode) | Computer Architecture & Organisation (CAO) - Computer Science Engineering (CSE) is a part of the Computer Science Engineering (CSE) Course Computer Architecture & Organisation (CAO).
All you need of Computer Science Engineering (CSE) at this link: Computer Science Engineering (CSE)
20 videos|86 docs|48 tests

Top Courses for Computer Science Engineering (CSE)

FAQs on I/O Interface (Interrupt & DMA Mode) - Computer Architecture & Organisation (CAO) - Computer Science Engineering (CSE)

1. What is an I/O interface in computer science engineering?
Ans. An I/O interface, also known as an input/output interface, is a hardware component that allows communication between the central processing unit (CPU) and peripheral devices. It provides a way for the CPU to send and receive data to and from external devices such as keyboards, mice, printers, and storage devices.
2. What is the difference between interrupt mode and DMA mode in an I/O interface?
Ans. In interrupt mode, the CPU initiates and controls the data transfer between the I/O device and memory. The CPU sends a request to the I/O device, waits for the device to complete the operation, and then resumes the execution of the program. On the other hand, in DMA (Direct Memory Access) mode, the CPU transfers control of the data transfer to a DMA controller. The DMA controller directly accesses the memory and transfers data between the I/O device and memory, allowing the CPU to perform other tasks simultaneously.
3. How does interrupt mode work in an I/O interface?
Ans. In interrupt mode, when an I/O device has completed an operation, it sends an interrupt signal to the CPU to notify it. Upon receiving the interrupt signal, the CPU suspends the execution of the current program, saves its state, and jumps to an interrupt handler routine. The interrupt handler routine handles the interrupt, processes the data from the I/O device, and then resumes the execution of the program from where it was interrupted.
4. What are the advantages of using DMA mode in an I/O interface?
Ans. DMA mode offers several advantages in an I/O interface. Firstly, it offloads the data transfer task from the CPU, allowing the CPU to perform other tasks concurrently. This improves overall system performance. Secondly, DMA mode reduces CPU overhead as the CPU does not have to handle each data transfer request individually. Lastly, DMA mode enables faster data transfer rates as the DMA controller can transfer data directly between the I/O device and memory without CPU intervention.
5. Can an I/O interface operate in both interrupt and DMA modes simultaneously?
Ans. Yes, an I/O interface can operate in both interrupt and DMA modes simultaneously. In a system with multiple I/O devices, some devices may utilize interrupt mode while others use DMA mode. This allows for efficient data transfer management and enables the CPU to handle different types of I/O operations concurrently. However, it is important to properly configure and prioritize the interrupt and DMA channels to avoid conflicts and ensure smooth operation.
20 videos|86 docs|48 tests
Download as PDF
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

Exam

,

ppt

,

I/O Interface (Interrupt & DMA Mode) | Computer Architecture & Organisation (CAO) - Computer Science Engineering (CSE)

,

practice quizzes

,

Semester Notes

,

I/O Interface (Interrupt & DMA Mode) | Computer Architecture & Organisation (CAO) - Computer Science Engineering (CSE)

,

Viva Questions

,

I/O Interface (Interrupt & DMA Mode) | Computer Architecture & Organisation (CAO) - Computer Science Engineering (CSE)

,

MCQs

,

Objective type Questions

,

shortcuts and tricks

,

Extra Questions

,

mock tests for examination

,

video lectures

,

pdf

,

study material

,

Previous Year Questions with Solutions

,

Important questions

,

past year papers

,

Summary

,

Sample Paper

,

Free

;