In this—the second major portion of this first chapter on multithreading—we shall now focus on the mechanics: using the pthreads API, how exactly does the programmer create and manage threads in an effective fashion? We will explore the essential pthreads API interfaces to fulfill this key purpose; this knowledge is the building block for writing functional and performance-friendly pthreads applications.
We will take you through the thread life cycle in terms of API sets—creating, terminating, joining upon (waiting for), and in general, managing the threads of a process. We will also cover thread stack management.
This, of course, implies that we have a pthreads runtime library installed on the Linux system. On modern Linux distributions, this will certainly be the case; it's only if you are using...