0
Write short note on Programmed I/O
i/o device • 13k  views
0  upvotes
0

There are three modes of transfer for data, commands and status as follows:

1) Programmed IO

2) Interrupt driven IO

3) Direct memory access

  • Programmed I/O is implicated to data transfers that are initiated by a CPU, under driver software control to access Registers or Memory on a device.
  • With programmed I/O, data are exchanged between the processor and the I/O module. The processor executes a program that gives it direct control of the I/O operation, including sensing device status, 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. With interrupt-driven I/O, the processor issues an I/O command, continues to execute other instructions, and is interrupted by the I/O module when the latter has completed its work.
  • With both programmed and interrupt I/O, the processor is responsible for extracting data from main memory for output and storing data in main memory for input. The alternative is known as direct memory access. In this mode, the I/O module and main memory exchange data directly, without processor involvement.
  • With programmed I/O, the I/O module will perform the requested action and then set the appropriate bits in the I/O status register. The I/O module takes no further action to alert the processor.

enter image description here

  • As shown in Figure 6, when the processor is executing a program and encounters an instruction relating to I/O, it executes that instruction by issuing a command to the appropriate I/O module. In particular, it does not interrupt the processor. Thus, it is the responsibility of the processor periodically to check the status of the I/O module. Then if the device is ready for the transfer (read/write).The processor transfers the data to or from the I/O device as required. As the CPU is faster than the I/O module, the problem with programmed I/O is that the CPU has to wait a long time for the I/O module of concern to be ready for either reception or transmission of data.

    i. The CPU, while waiting, must repeatedly check the status of the I/O module, and this process is known as Polling.

    ii. Therefore, the level of the performance of the entire system is severely degraded.

0  upvotes
Please log in to add an answer.

Next up

Read More Questions

If you are looking for answer to specific questions, you can search them here. We'll find the best answer for you.

Search

Study Full Subject

If you are looking for good study material, you can checkout our subjects. Hundreds of important topics are covered in them.

Know More