Using the poll() Driver

Using /dev/poll provides a highly scalable way of polling a large number of file descriptors. This scalability is provided through a new set of APIs and a new driver, /dev/poll. The /dev/poll API is an alternative and not a replacement of, poll(2). Use poll(4D) to provide details and examples of the /dev/poll API. When used properly, the /dev/poll API scales much better than poll(2). This API is especially suited for applications that satisfy the following criteria:

  • Applications that repeatedly poll a large number of file descriptors

  • Polled file descriptors that are relatively stable, meaning that the descriptors are not constantly closed and reopened

  • The set of file descriptors that actually have polled events pending is small, comparing to the total number of file descriptors that are being polled