O'Reilly logo

Hands-On System Programming with Linux by Kaiwan N Billimoria

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required