Threads vs processes – look again

Right from the start of this trilogy ( Chapter 14, Multithreading with Pthreads Part I - Essentials, Chapter 15, Multithreading with Pthreads Part II - Synchronization, and Chapter 16, Multithreading with Pthreads Part III) on multithreading with pthreads, with regard to the multiprocess (single-threaded) versus multithreaded argument, we have repeatedly said that it's not all advantages or disadvantages—there is always some of both, a trade–off.

Table 4 and Table 5 describe some of the pros and cons of the multiprocess (several single-threaded processes) versus the multithreaded (several threads within a single process) approaches.

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.