and (if what I remember is correct) interrupt signals are sent to your program to pause it and make it wait for the devices to continue. I believe they are known as IRQs. (or its the other way around when the software sends an IRQ to the hardware, I forgot...)
edit:
ok just checked it out:
IRQs are sent form the hardware to the CPU so the CPU stops communication with the program (for like a nanosec) and talks with the hardware etc.
-LC