I/O operations will mean a data transfer between an I/O device and memory or between an I/O device and the processor.
Programmed I/O
AU:
Dec.-06, 08
• I/O operations will mean a data
transfer between an I/O device and memory or between an I/O device and the
processor.
• If in any computer system I/O
operations are completely controlled by the processor, then that system is said
to be using 'programmed I/O'.
• When such a technique is used,
processor executes programs that initiate, direct and terminate the I/O
operations, including sensing device status, sending a read or write command
and transferring the data.
• It is the responsibility of the
processor to periodically check the status of the I/O system until it finds
that the operation is complete.
Example
• The processor's software checks each of
the I/O devices every so often. During this check, the processor tests to see
if any device needs servicing. Fig. 8.7.1 shows the flowchart for this. (See
Fig. 8.7.1 on next page.)
• This is a simple program which
services I/O ports A, B and C. The routine checks the status of I/O ports in
proper sequence.
• If the request bit is set, the corresponding
service routine is called to complete the I/O request.
• This test and service procedure
continues until all the I/O port status registers are tested and all the I/O
ports requesting service are serviced. Once this is done, the processor
continues to execute the normal programs.
• The routine assigns priorities to the
different I/O devices. Once the routine is started, the service request bit at
port A is always checked first. Once port A is checked, port B is checked, and
then port C. However, the order can be changed by simply changing the routine
and thus the priorities.
Review Questions
1. What do you mean by programmed I/O ? AU:
Dec.-06, Marks 6
2. Write short notes on polling. AU:
Dec.-08, Marks 16
Digital Principles and Computer Organization: Unit V: Memory and I/O : Tag: : Memory and I/O - Digital Principles and Computer Organization - Programmed I/O
Digital Principles and Computer Organization
CS3351 3rd Semester CSE Dept | 2021 Regulation | 3rd Semester CSE Dept 2021 Regulation