Unit 2
Unit 2
Internal External
• It is initiated by some exception • It is initiated by an external
condition caused by program. event.
• It is synchronous with program • It is asynchronous with program
• If program is rerun, the internal • It depends on external
interrupt will occur in same conditions that are independent
time. of program being executed at
the time.
Difference between interrupt and subroutine
• Programmed I/O
• Interrupt initiated I/O
• DMA
Programmed I/O
• I/O device does not have direct access to memory.
• When data is available, the device place it in I/O bus and enables its data valid line.
• The interface accepts the data into its data register and enables the data accepted line.
• The device disables the data valid line but it will not transfer another data until the data
accepted line is disabled by interface.
• It is useful in slow low speed computers.
• It is an inefficient data transfer technique because of the difference in data transfer rate
between CPU and I/O.
Flowchart for CPU program to input data