Overlapping CPU with I/O

This point is similar in fashion to the previous one—the logical separation of tasks. In the context of what we're discussing, CPU refers to software that is CPU-intensive or CPU-bound (the canonical example being the while (1); piece of C code); I/O refers to software that is in a blocked state—we say that it is waiting on I/O, meaning that it is waiting on some other operation to complete (perhaps a file or network read, or any blocking API, in fact) before it can move forward; this is referred to as I/O bound.

So, think of it this way: let's say we have a series of tasks to perform (with no dependencies between them): task A, task B, task C, and task D.

Let's also say that task A and task C are highly CPU-bound, ...

Get Hands-On System Programming with Linux 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.