Modules for introducing threads
David P. Bunde* * Knox College
Abstract
This chapter presents a pair of modules for introducing students to parallel programming. Each module is built around an exploratory exercise to parallelize an application, which can be used in a laboratory or a lecture. They illustrate fundamental concepts such as speedup, race conditions, privatizing variables, and load balance. Variations teach students about explicit threading (in C, C++, or Java) and OpenMP (in C/C++).
Keywords
Threads
OpenMP
Shared memory
Race conditions
Load balancing
Parallel overhead
Relevant core courses: Systems, CS2.
Relevant parallel and distributed computing topics: Shared memory: compiler directives/pragmas (A), libraries (A); ...
Get Topics in Parallel and Distributed Computing 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.