Polling is a technique where the CPU repeatedly checks an I/O controller to determine if data is available or if the device is ready. The CPU uses PIO to read status registers from the controller in a loop until the desired condition is met.
int pollDeviceForValue() {
volatile int *ready = 0x80000100;
volatile int *value = 0x80000104;
while (!*ready) {} // Busy-wait until ready
return *value;
}
Polling is acceptable when: