6.5.4+Controlling+of+peripheral+devices

=**__Explain how peripheral devices are controlled with reference to the printer, modem and disk drive.__**=


 * __Printing a document__**
 * 1) User clicks 'print'
 * 2) Computer polls the printer to determine when it is ready
 * 3) Once it is ready, the printer & computer perform a handshake
 * The handshake ensures that the connection is established & that the printer and computer are actually able to communicate (if correct drivers are installed on the computer, for ex.)
 * If there is some kind of problem (ex. the toner is low) an interrupt is sent to the CPU
 * 1) Document to print is stored in a buffer and sent to the printer, where it might be stored in another buffer before it is finally printed
 * 2) Once the printer is finished & ready to perform the next printing task, it indicates this to the computer

__**Modem to modem communication**__
 * 1) A handshake is performed to initiate the connection
 * The handshake checks whether both modems use the same protocols. Usually the modems will check if the other device supports the fastest protocols first and then work backwards until a protocol is found, which is supported by both devices.
 * 1) If a protocol is found, which is supported by both devices, the modem indicates to the computer that it is ready to be used. If the modem can't establish a connection, it will send an interrupt to the computer that the channel is not available.

__**Disk drive**__ Controlled with the disk drive controller:
 * 1) Computer indicates to the controller, that it wants to read data from or write data to the disk
 * 2) Data is transferred to the buffer of the controller, which then coordinates the rest of the read or write process

Created By: Jocbe Last update: 17. January 2011

Sources: >
 * "IB Computing: 6.5 Computer/peripheral Communication." IB Computing Net - Home Page. 31 May 2009. Web. 17 Jan. 2011. .
 * Jones, Richard. Computer Science Java Enabled. Victoria: IBID Press, 2004.