[004 Interrupt] Which one is more efficient, interrupt or polling? How to decide whether to use the interrupt method or the polling method to realize the driver?

Interruption is when the CPU is in a passive state to receive a signal from the device, and polling is when the CPU actively checks whether the device has a request.

1. For a device that frequently requests cpu, or a network device with a large number of data requests, the efficiency of polling is higher than that of interrupts.

2. If it is a general device, and the frequency of the device requesting the CPU is relatively low, the efficiency of using interrupts is higher.

It mainly depends on the request frequency.
 

Guess you like

Origin blog.csdn.net/qq_41709234/article/details/131225674