October 2010
Intermediate to advanced
1552 pages
45h 39m
English
This chapter discusses three alternatives to the conventional file I/O model that we have employed in most programs shown in this book:
• I/O multiplexing (the select() and poll() system calls);
• signal-driven I/O; and
• the Linux-specific epoll API.
Most of the programs that we have presented so far in this book employ an I/O model under which a process performs I/O on just one file descriptor at a time, and each I/O system call blocks until the data is transferred. For example, when reading from a pipe, a read() call normally blocks if no data is currently present in the pipe, and a write() call blocks if there is insufficient space in the pipe to hold the data to be written. Similar behavior occurs when ...
Read now
Unlock full access