How to use this bookΒΆ
Parallel Programming for Beginners is a free on-line textbook designed to teach early computing students the basics of parallel and distributed computing. Unlike a traditional textbook, we do not anticipate that this textbook be adopted in full in a particular course; rather, we imagine that components of this textbook can be used as required reading or used for in-class activities in various courses.
For example, here are just a few suggested scenarios:
Most students should find chapter 0 useful as background reading to introduce PDC concepts. In particular, section 0.4 describes PDC concepts with analogies instead of code and provides a basis for the code that follows in subsequent chapters.
Students in CS1, CS2 or Systems who have some familiarity with C/C++ should be able to actively try Chapter 1 in a class period.
Any students at any level who have some experience with Python should be able to actively work through the examples in Chapter 2. In that chapter we also suggest how the sections can be split over class or lab periods.
Upper-level courses that cover message passing may also choose to adopt content from chapter 2 because the Python examples are fairly straightforward.
An algorithms course may want to delve into a subset of the sections in Chapter 3 in their course after assigning some of the background reading from Chapter 0. Also, the application in Chapter 6, section 1 described below might be of interest.
Chapters 4 and 5 (CUDA programming on GPUs) are likely applicable to students who have gained some experience with C or C++. Chapter 4 is designed to be able to be attempted in a 1.5 hour lab. Chapter 5 carries on from Chapter 4 if you want to spend more time getting into a few more details of CUDA programming.
Chapter 6 has two applications that may be used differently:
In 6.1, the AI minimax algorithm is described, along with parallel implementations in OpenMP (shared memory from chapter 1 is background) and MPI (chapter 2 MPI is background).
In 6.2, the matrix multiplication application is described, with implementations in OpenMP and CUDA. These implementations could be follow-on activities after either Chapter 1 or 4.
This book assumes that you have some programming knowledge (CS1 foundation), and are at the very least familiar with some Python and/or C. For readers unfamiliar with these concepts, we encourage you to check out other free resources such as How to Think Like a Computer Scientist and Dive into Systems.