CS 343 Concurrent and Parallel Programming


Watch a video introduction to the course on YouTube.

Objectives

An introduction to advanced control-structures with an emphasis on concurrency and writing concurrent programs at the programming-language level. Programming techniques and styles are examined to express complex forms of control flow, such as multi-level loop exit, data-structure iterators, exceptions, coroutines, and concurrency. Students will learn how to structure, implement and debug concurrent programs.

Intended Audience

CS 343 is intended for Computer Science students planning to do advanced high-level programming.

Related Courses

Prerequisites: CS 350 or SE 350; Computer Science students only.

Hardware/Software

Used in Course: C++.

Assumed Background: Sequential C++ programming skills.

References

Course notes are required.

Schedule

3 hours of lectures per week. Normally available in Fall and Winter.

Outline

Advanced Control Flow (3 hours)

Multi-exit loops, multi-level exits, exceptions (termination/resumption), iterators.

Coroutines (4 hours)

Multiple stacks, context switching. Semi and full coroutines.

Introduction to Concurrency (3 hours)

Starting multiple threads, synchronizing and communication among threads. Ready queue, thread states, interrupts.

Mutual Exclusion (4 hours)

Software and hardware solutions for critical sections. Dekker and Peterson algorithms. Test and set.

Semaphores (4 hours)

Binary and counting semaphores. Baton passing and split binary semaphores. Bounded buffer and readers/writer. Semaphore implementation.

Concurrency Errors (3 hours)

Race condition, starvation, live-lock, deadlock: synchronization and mutual exclusion. Examine deadlock: prevention, avoidance and recovery.

High-Level Concurrency (6 hours)

Conditional critical regions, monitors, tasks. Internal and external scheduling of tasks. Rendezvous. Client/Server.

Increasing Concurrency (3 hours)

Server: buffering, secretary, administrator, workers, courier. Client: sync/async communication, tickets, call-backs, futures.

Other Concurrency Approaches (6 hours)

Concurrent programming languages: Ada, Java, Actors, Linda (tuple space). Threads/locks: pthreads. Threads/message-passing: PVM/MPI. Kernel threads (parallel execution). Remote procedure/method call. Distributed communication: sockets.


Campaign Waterloo

David R. Cheriton School of Computer Science
University of Waterloo
Waterloo, Ontario, Canada N2L 3G1

Tel: 519-888-4567 x33293
Fax: 519-885-1208

Contact | Feedback: cs-webmaster@cs.uwaterloo.ca | David R. Cheriton School of Computer Science | Faculty of Mathematics


Valid HTML 4.01!Valid CSS! Last modified: Tuesday, 04-Sep-2012 10:34:58 EDT


Menu:ShowHide