codescracker


operating system os

OS Input/Output using DMA



« Previous Tutorial Next Tutorial »


Input/Output using Direct Memory Access (DMA) is another way to perform input/output.

As you have already known from the previous tutorial that interrupt-driven input/output wastes the CPU time.

Therefore, now the idea is to let the direct memory access (DMA) controller feed the characters to the printer one at time, without wasting any CPU time.

The code given below shows this method of input/output using direct memory access (DMA).

Print String using DMA

Code executed when the print system call is made.

copy_from_user(buffer, p, count);
set_up_DMA_controller();
scheduler();

Interrupt service procedure.

acknowledge_interrupt();
unblock_user();
return_from_interrupt();

« Previous Tutorial Next Tutorial »




Tools
Calculator

Quick Links
Signup - Login - Give Online Test