Chapter 5. Shared-Memory Programming with OpenMP
Like Pthreads, OpenMP is an API for shared-memory parallel programming. The “MP” in OpenMP stands for “multiprocessing,” a term that is synonymous with shared-memory parallel computing. Thus, OpenMP is designed for systems in which each thread or process can potentially have access to all available memory, and, when we're programming with OpenMP, we view our system as a collection of cores or CPUs, all of which have access to main memory, as in Figure 5.1 .
Although OpenMP and Pthreads are both APIs for shared-memory programming, they have many fundamental differences. ...