HomeFAQ |
|
|
Inquiry |
|
Procedure Inquiries Mode: through this way, CPU can use I/0 instructions to ask the current status of the specified equipment. If the equipment is ready, the input and output of data can be carried out. Otherwise CPU waits, and cycle requires. The advantage of this type is the simplification of structure, and you only need several hardware circuits.
Interrupt Mode: by using this way, CPU can implement other programs instead of being passive to wait. Once the peripheral is ready for the exchange of information, you can make service requests to the CPU. If the CPU is in response to the requests, it will temporarily suspend the implementation of the current procedures and turn to implementation the corresponding services and procedures, and then to continue the implementation of the original procedure which was interrupted.
The advantage of interrupt mode is obvious: It not only eliminates the time needed for the CPU to query and wait the peripheral status and improve the efficiency of the CPU, but also meets the requirements of real-time peripherals.
In addition, the disadvantage of interrupt mode is every sending of each character needs interruption. It will take much work to start interrupt controller and also to retain and restore the original scene in order to continue the implementation of the procedures. So, if large amounts of data need to be exchanged, system performance will be very low.
DMA Mode: the shortened form of direct memory access. The delivery of the DMA does not need the interference of CPU. It needs data transfer between I/O devices and storage under the control of the hardware circuit, which is called DMA controller.
Compared with Interrupt Mode, DMA Mode has the following characters When you use Interrupt Mode, CPU needs to implement many directions, which asks for plenty of time, but DMA one-byte transfer only takes up one cycle from the CPU cycles, so time has been less than CPU .
The response speed of DMA is more quickly than Interrupt Mode's. After I/O device make the interrupt request, CPU can only response after it has implemented the current instructions, but DMA request can get response after bus cycle has finished the implementation.
As for fast I/O devices, the transmission speed of the Interrupt Mode can not meet the requirements any more. You must use DMA Mode to finish the operation for the data transmission of the fast I/O devices. |
|
|