The multiprocess vs the multithreading model – cons of the MT model

Here are some cons of the MT model over the single-threaded process:

Context Multiprocess (single-threaded) model Multithreaded (MT) model
Thread-safety No such requirement; processes always have address space separation. The most serious downside: every function in the MT application that can be run in parallel by threads must be written, verified, and documented to be thread-safe. This includes the app code and the project libraries, as well as any third-party libraries it links into.
Application integrity In a large MT app, if any one thread encounters a fatal error (such as a segfault), the entire app is now buggy and will have to shut down. In a multiprocess app, ...

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.