Professional Multicore Programming: Design and Implementation for C++ Developers
by Cameron Hughes, Tracey Hughes
Appendix B. Concurrency Models
This appendix provides a quick reference to the concurrency models used in this book. Concurrency models determine how concurrent tasks delegate work to the tasks and how communication is performed. The models can also supply a structure and approach that will assist you in determining the access policies. Here, we compiled the concurrency models with a short definition and diagram for each model.
Interprocess and Interthread Communication
With Interprocess Communication (IPC), communication between processes is performed by mechanisms that exist outside both address spaces of the processes.
With Interthread Communication (ITC), communication between threads occurs within the address space of the process the communicating threads exist.
In Figure B-1, you see that the IPC resides outside the address space of both processes. IPC allows for communication and the transference of data between related or unrelated processes. ITC resides within the address space of a process. As you can see, ITC mechanisms allow threads of the same process to access global data and variables, parameters, and file handles.
See Figure B-1 for an example of both.

Figure B.1. Figure B-1
Boss/Worker Approach 1 with Threads
The boss thread creates a new thread for each task. The threads can then execute their tasks simultaneously. The threads are active. Interthread Communication (ITC) ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access