Breaking News

Programmed I/O vs Interrupt-driven I/O: Understanding the Difference

Input/Output (I/O) operations are fundamental to computer systems. They allow the system to interact with external devices such as keyboards, mice, printers, and other peripherals. Two common methods used to perform I/O operations are programmed I/O and interrupt-driven I/O. In this article, we will explore the difference between these two methods and how they are implemented.

Programmed I/O:

Programmed I/O is a simple method of performing I/O operations. In programmed I/O, the processor directly communicates with the I/O device to transfer data. This method involves the following steps:
  • The processor sends a request to the I/O device to transfer data.
  • The I/O device responds to the request by sending or receiving data.
  • The processor waits for the I/O operation to complete before moving on to the next instruction.
Programmed I/O is a synchronous operation, which means that the processor waits for the I/O device to respond before it can execute the next instruction. This method is suitable for simple I/O operations that involve small amounts of data.

Interrupt-driven I/O:

Interrupt-driven I/O is a more sophisticated method of performing I/O operations. In this method, the processor does not wait for the I/O device to respond. Instead, the I/O device sends an interrupt signal to the processor when it is ready to send or receive data. The processor then suspends its current task and services the interrupt request. Once the interrupt request is serviced, the processor resumes its previous task.

Interrupt-driven I/O is an asynchronous operation, which means that the processor does not have to wait for the I/O device to respond. This method is suitable for complex I/O operations that involve large amounts of data.

Difference between Programmed I/O and Interrupt-driven I/O:

The main difference between programmed I/O and interrupt-driven I/O is that in programmed I/O, the processor waits for the I/O device to respond before moving on to the next instruction. In interrupt-driven I/O, the processor does not wait for the I/O device to respond. Instead, it services the interrupt request and then resumes its previous task.



interrupt driven io vs programmed io



















In conclusion, both programmed I/O and interrupt-driven I/O are methods used to perform I/O operations. Programmed I/O is a simple method suitable for simple I/O operations that involve small amounts of data. Interrupt-driven I/O is a more sophisticated method suitable for complex I/O operations that involve large amounts of data. By understanding the difference between these two methods, developers can choose the appropriate method for their application to optimize system performance.

Read more ...

Importance of I/O Module

What is I/O module?

The I/O (Input Output) module works as a mediator between  I/O devices and the processor. It conveys the information from I/O device (Sometimes called as peripheral or external device) to processor and vice versa. An I/O module at one end is connected to the system bus (information transmission cable) of processor and at the other end may be connected with a number of I/O devices.


I/O module diagram

Can’t we connect directly the I/O devices to processor? Why do we need to use I/O module ?

Necessity of I/O module: 

There are several reasons which lead to use I/O module for establishment connection between I/O devices and the processor:
  • I/O devices are most of case usually electrical/mechanical/electronic devices where processor is an electronic device. Also the data transfer rates of  I/O  are often slower than the processor and memory.  So it is significant that the speed and electrical characteristics of I/O are different from CPU.
  • There are a variety of peripherals that exist and may need to be connected to the same system bus. But it may be difficult to incorporate all the peripheral device logic into CPU. This reduces flexibility and creates hinderances  in new developments.
  • Peripheral often use different data formats and word lengths that used by the CPU.
Incorporation of I/O module helps to overcome these problems. 

I/O modules are a crucial component of computer systems that allow communication between the CPU and external peripherals. They come in different types and configurations, and can be connected to the computer using memory-mapped or isolated I/O. The use of interrupts and interrupt-driven I/O is also an essential concept in I/O modules. Understanding the various types and techniques of I/O modules is important for designing and implementing efficient and reliable computer systems.
Read more ...

Understanding Computer Interfaces: may be Hardware or Software

What is Interface ?

A computer interface is a concept that refers to a point of interaction between objects or components and is applicable at the level of both hardware and software. That is why interfaces are classified as:

Hardware Interfaces: 

This exist in computer system via physical contacts between many of the components such as the various buses, storage devices, other I/O devices to exchange information. Hardware interfaces include physical connectors, ports, and other components that enable devices to connect and communicate with each other. Examples of hardware interfaces include USB, HDMI, Ethernet, and PCI.

Software Interfaces: 

Software interfaces, on the other hand, are sets of rules, protocols, and tools that enable different software systems and components to communicate and interact with each other. Examples of software interfaces include APIs (Application Programming Interfaces), protocols like TCP/IP, and programming languages like Python that provide libraries and modules for interacting with other software systems.
These may refer to a range of different types of interface at different levels not in physical manner. Likely, an Operating system (OS) may interface with pieces of hardware. Again applications or programs running on the OS may need to interact via streams and in object oriented programs (OOP) objects within an application may need to interact via methods.


In many cases, hardware and software interfaces work together to enable communication and interaction between different components and systems.
Read more ...
Designed By