tags: operating-system output architecture

CPU talks with IO devices using device controllers. More specificially, CPU send request to device driver and device driver talks with device controller.

There are different approaches of communication involves in different computer architectures. Some of them are

  1. Device driver send request to device controllers and waits for device controller to give some response. Device driver goes to a tight loop of waiting.
  2. Device driver gets interrupted from device controller once the operation is done.
  3. Using a dedicated hardware DMA (Direct Memory Access). There is no intervention of CPU in the data transfer. CPU talks to DMA when there is an IO operation and once the operation is done, CPU gets notified by DMA.