O'Reilly logo

Topics in Parallel and Distributed Computing by Charles C Weems, Alan Sussman, Arnold L Rosenberg, Anshul Gupta, Sushil K Prasad

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4

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); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required