1. Hardware, Processes, and Threads

It is not necessary to understand how hardware works in order to write serial or parallel applications. It is quite permissible to write code while treating the internals of a computer as a black box. However, a simple understanding of processor internals will make some of the later topics more obvious. A key difference between serial (or single-threaded) applications and parallel (or multithreaded) applications is that the presence of multiple threads causes more of the attributes of the system to become important to the application. For example, a single-threaded application does not have multiple threads contending for the same resource, whereas this can be a common occurrence for a multithreaded application. ...

Get Multicore Application Programming: For Windows, Linux, and Oracle® Solaris 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.