O'Reilly logo

C++ Multithreading Cookbook by Milos Ljumovic

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

Using pipes

When we are explaining synchronization, it is absolutely necessary to give an example with processes. Unlike working in single address space, as with threads, working with multiple processes and their address spaces has its upsides and downsides.

The upsides are generally, in lower probability of errors. The context and address space of a process is private for the process and all its resources, including threads. If you allocate some memory location in one process and pass a pointer to another process, it will be meaningless! The operating system creates separate address spaces for all processes. The running process does not know anything about other processes, and as such, it is greedy: it wants all resources for itself. So, when ...

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