.. _io_wait: Waiting for I/O ================ Many types of input / output (I/O) do not occur immediately. So the process must wait in a waiting queue and the device driver needs a strategy of how to effectively wait for I/O data. Polling ---------------------------- Polling is not very efficient because the system must continually check the device for data. .. note:: I can not remember where I read this, but it is my understanding that only joy--sticks (game ports) use polling in modern operating systems. .. index:: polling .. figure:: polling.png :align: center Interrupt Driven ---------------------------- .. figure:: interrupt-driven.png :align: center It is more efficient to start an I/O peripheral doing a task and let it interrupt the system when the I/O operation is finished. The interrupt driven approach causes drivers to consist of a top and bottom half.