I/O Scheduling Functions
In order for the UNIX kernel to know when your process should be awakened for I/O, your process must first register the I/O events that it is interested in. This is accomplished with the system call select(2) or poll(2). Because these calls are so similar, some UNIX systems implement one of the calls in terms of the other.
The select(2) system call will be presented first in this chapter. However, before you can use the select(2) function, you must first get to know file descriptor sets and the timeval structure that it uses.
File Descriptor Sets and Their Macros
In order to work with the select(2) system call, you must work with file descriptor sets. These are collections of file descriptors that make it easier to specify ...
Get Advanced UNIX Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.