chapter ten
10 Non-blocking I/O
In this chapter
- You extend your knowledge of message passing IPC from a single computer to a distributed network of computers
- You meet a typical and very popular example of an I/O-bound application, the client-server application
- You learn that the use of multiple threads or processes has its limits and its problems when it comes to I/O operations
- You get to know non-blocking operations and how they can help us hide I/O-bound operations
As processor speeds have historically increased, allowing for the execution of more operations in a given time, I/O speeds have struggled to keep up. Applications today heavily rely on I/O rather than CPU operations, resulting in longer durations for tasks such as writing to the hard disk or reading from the network compared to CPU operations. Consequently, the processor remains idle while waiting for the completion of I/O, preventing the application from performing any other tasks. This limitation creates a significant bottleneck for high-performance applications.