Input/Output Device Management

Principles of Input/Output Device Management

The following labs demonstrate some of the workings of the I/O Device Memory Management Techniques from the notes plus some examples of fundamental principles in I/O Memory Management.

Time for you to practice by going through the examples to help you understand the I/O memory management techniques in better depth

I/O Data Transmission Modes

Programmed I/O

  • When the device produces or consumes a small amount of data at low data rates, Programmed I/O data transfer method may be the best way of managing the data transfer in and out of main memory

EG: Programmed Input/Output

Interrupt I/O Mode

  • Suppose a program needs input from a device which communicates using interrupt. Even with the present-day technology the devices are much slower than the processor. So if the program waits on the input device it would cycle through many processor cycles just waiting for the input device to be ready to communicate. This is where the interrupt mode of communication suits!

EG: Interrupt Input/Output

DMA I/O Mode

  • DMA ensures access to main memory without processor intervention or support. Such independence from processor makes this mode of transfer extremely efficient. So DMA is the hardware mechanism that allows peripheral components to read from the memory or to write to it directly without involving the CPU.

EG: DMA Input/Output

  1. The program makes a DMA set-up request.

  2. The program deposits the address value A and the data count D. The program also indicates the virtual memory address of the data on disk.

  3. The DMA controller records the receipt of relevant information and acknowledges the DMA complete.

  4. The device communicates the data to the controller buffer.

  5. The controller grabs the address bus and data bus to store the data, one word at a time

  6. The data count is decremented

  7. The above cycle is repeated till the desired data transfer is accomplished. At which time a DMA data transfer complete signal is sent to the process.

I/O Access Time

  • There is and has been a lot of work done in trying to bridge the gap between the speed of processors and main memory and the speed of disk access and in effect improving the performance of disk storage.

Eg of I/O Timing

  • It is clear that the order in which sectors are read from the disk has a tremendous effect on I/O performance.