In this method when the operating system writes the

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ntroller is in charge of a specific type of device such as disk drives, tape drives, printers. A device controller maintains some local buffer storage and is responsible for moving data between the I/O device it controls and its local buffer storage. Each device controller also has a few registers that it uses for communicating with the CPU. On some computers, these registers are part of the regular memory address space. This scheme is called memorymapped I/O. On other computers, a special address space is used for I/O, with each device controller allocated a certain portion of it. To perform an I/O operation, the operating system writes the relevant commands and their associated parameters into the appropriate controller's registers. After having finished loading the commands into the controller's registers, the CPU resumes with its normal operation. The device controller then examines the contents of these registers and performs necessary actions for the requested I/O operation. For example, the action for a read request will be to transfer data from the specified input device to its local buffer. Once the transfer of data from input device to the controller's local buffer is complete, one of the following two methods is used to transfer the data from the controller's local buffer to the appropriate memory area of the computer: 1. Non-DMA Transfer. In this method, as soon as the transfer of data from input device to the controller's local buffer is complete, the controller causes an interrupt to allow the operating system to gain control of the CPU. When the CPU is interrupted, it stops what it is currently doing and routine for handling the interrupt is located. On execution of the instructions of the interrupt service routine by the CPU, the data gets transferred from the local buffer of the device controller to main memory. Once this transfer of data is completed, the CPU can then resume with the computation that it was doing when it was interrupted. DMA Transfer. In the method of non-DMA transfer, the CPU is involved in the transfer of data from the device controller's...
View Full Document

This document was uploaded on 04/07/2014.

Ask a homework question - tutors are online