Transferring Data To and From Devices - Introduction

Transferring Data To and From Devices - Introduction


OK - we know when a device needs service, and we know (in general terms) how we communicate commands and status to and from the device. Now there is one more question before we see some examples:

How is data transferred to and from devices?

There are, again, two possibilities:

In looking at these, let's take input from, say, a disk or network controller as an example.

Typically a device will collect input data in the controller. When there is a certain amount of data in the controller the device will generate an interrupt (or set a flag in a status register in the case of polled I/O) to inform the CPU. Now we need to somehow get the data from the device to main memory.

1