DMA is the hardware mechanism that allows peripheral components to transfer their I/O data directly to and from main memory without the need to involve the system processor.
- When a process calls read, the driver method allocates a DMA buffer and instructs the hardware to transfer its data into that buffer. The process is put to sleep.
- The hardware writes data to the DMA buffer and raises an interrupt when it’s done.
- The interrupt handler gets the input data, acknowledges the interrupt, and awakens the process, which is now able to read data.