Markdown

PIO

PIO is the Acronym for Programmed Input Output

Programmed input and output is a way for the processor itself to move each byte to or from a disk controller. The processor writes a value, waits until the controller is ready, and writes the next. Nothing else runs on that processor while it is in the loop. Later methods let the controller move the block and interrupt the processor when the block is done.

The mode was used by Integrated Drive Electronics (IDE) disks. The processor did the copying. A later mode on the same disks let the drive write memory directly and freed the processor from the loop.

What the Processor Does in the Loop

  • Wait. It reads a status bit until the controller can take another value.
  • Move one value. It copies a byte or a word, then waits again.
  • Nothing else. The loop holds the processor until the block is finished.

Processor Loop and Direct Memory Transfer

ComparedProcessor LoopDirect Memory Transfer
Who copies the bytesThe processorThe controller
Other work meanwhileStallsContinues
When the processor is toldIt already knows. It is in the loopAn interrupt at the end of the block