What's the difference between DMA Controller and I/O processor

Sach picture Sach · Apr 24, 2013 · Viewed 10.2k times · Source

Given the starting memory address & word count DMA controller transfers data while the CPU works on some other process. The Input Output processor too handles I/O processes given the starting address & word count.. (correct me if I'm in error)

So what's the difference in functionality between IOP & DMA controller?

Answer

axiqia picture axiqia · Jun 6, 2017

In case of memory specific I/O operations (Simple example instructions like lw $r1,$r2,16 in case of MIPS processor), CPU needs to get the data from memory,to facilitate I/O operations. And so CPU has to pause any other operation and monitor the memory READ/WRITE operation till it is not completed. In other words CPU is totally occupied as long as read/write operation is in progress without DMA .If the processor was free during this time,then processor could have executed some other instructions .

Direct Memory Access(DMA):

DMA provides this capability to carry out memory specific operations with minimal CPU intervention. When any I/O device needs a memory access. It sends a DMA request(in form of interrupt) to CPU. CPU initiates the the transfer by providing appropriate grant signals to the data bus. And passes the control to the DMA controller which controls the rest of the data transfer and transfers the data directly to I/O device. During this time, CPU continues with other instructions. Once the Read/Write operation in completed (or any exception is occurred )the DMA controller initiates an interrupt and notifies the processor about the status of read/write operation.

In this way the read/write operation is also carried out and CPU also executes some other instruction during that time. However, initialization of DMA still requires CPU intervention. And so the overall performance is maximized.

I/O processor

You can think I/O processor along the lines of DMA approach. The I/O processor, generally used in large computer systems, is a coprocessor which is capable of executing the instructions in addition to transfer of data. By the way, the coprocessor instruction system is different from the central processing unit.

CPU can execute the I/O specific program by initializing the basic operations like enabling the data path and setting up the I/O devices participating in operation. And then it transfers the task to I/O processor,which then carry out rest of the tasks and upon completion notifies the processor. The processor meanwhile executes other important instructions.

The I/O processor is essentially a small DMA dedicated processor that can execute limited input and output instructions and can be shared by multiple peripherals.

The I/O processor solves two problems:

  • The job of input and output is assumed by the CPU. Although DMA does not require CPU for data exchange between peripherals and memory, it only reduces the burden of CPU. Because in DMA, the initialization of input and output is still done by CPU.
  • The problem of sharing DMA interface of high speed equipment in large computer system. A large computer system peripherals so much that it had to share the DMA interface Limited (small computer systems such as PC in each device is assigned a DMA high speed interface).