Concurrent and Parallel Programming with Pthreads

LENGTH: 1 day

DESCRIPTION: This tutorial will give an introduction to the POSIX threads APIs that are designed for concurrency and parallelism in system programming. In a simplest sense threads are streams of control within a process performing different tasks at the same time. Threads within a process can share data and use less resources than using processes. On shared memory systems with multiple processors or cores, threads can be scheduled and dispatched by the operating system to different processors/cores, thus the concurrency and parallelism can be achieved. In this tutorial we will introduce the common models that are used in multithreaded applications. We will address the synchronization and race condition issues that are generally associated with concurrent programming. During the one day tutorial, attendees will be exposed to various concepts and examples. The attendees will be given a number of exercises with sample code to get a hands-on experience in implementing some of the commonly used models, including fork-join, manager/worker, thread pool, barrier and message queues, etc.

PREREQUISITES: The attendees are expected to be familiar with the C/C++ programming language, data structures and UNIX systems.

LAB: Hands-on exercises.