O'Reilly logo

Advanced UNIX Programming by Warren W. Gay

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required