From the course: Computer Architecture Essentials

Unlock this course with a free trial

Join today to access over 24,400 courses taught by industry experts.

Polling vs. interrupts

Polling vs. interrupts

- [Instructor] Let's compare IO handling by polling versus interrupts. Polling is a simple approach that every processor can execute. It is sometimes known as busy waiting or spinning because the processor remains in a loop, waiting for the IO condition to occur. Interrupt driven IO handling is a multi-threaded approach where you have special callback functions that execute when attention from the CPU is needed by an IO device. Polling is a software technique that runs in a loop with no additional hardware requirements. Interrupt-driven IO handling is a hardware technique that requires an interrupt controller equipped with dedicated signals to let the CPU know when there is an IO request pending. To implement polling, you just write the IO handling functions and call them in your code. For interrupt, you write the interrupt handlers and you set up which IO device these functions are associated with. In hardware, this is configured in special memory locations known as interrupt…

Contents