Solution
Interrupts - An interrupt is an event that stops the current process in the CPU so that the
CPU can attend to the task needing completion because of the event

B. Polling - A polling-based program (non-interrupt driven) continuously polls or tests
whether or not data are ready to be received or transmitted. This scheme is less efficient
than the interrupt scheme.

popatim

Titan
Moderator
Polling is how often the software checks on something, like windows checking to see if you moved the mouse or goes out and updates the time on the clock. Polling needs to be programmed and as such it will happen like clockwork and always use a specific amout of cpu time.

Interrupts are used by the hardware to signal the cpu that its has work for it to do; something has changed. If the interrupt is never received then no cpu cycles are used, unlike polling.
 

ghnader hsmithot

Distinguished
Interrupts - An interrupt is an event that stops the current process in the CPU so that the
CPU can attend to the task needing completion because of the event

B. Polling - A polling-based program (non-interrupt driven) continuously polls or tests
whether or not data are ready to be received or transmitted. This scheme is less efficient
than the interrupt scheme.
 
Solution
For the record, polling is ALWAYS incorrect, as its a waste of CPU resources. If you need to wait for something, it is far more efficent to send a Windows message that the task is complete, then have an event in place for that message.

Asking "Are you done yet" a couple thousand times per second is a great way to constantly work at 99% CPU usage while sending performance off a cliff...