CS267: Lecture 5

Shared Memory Programming

September 12, 2001

Lecturer: Kathy Yelick


We discuss the shared memory programming model using Posix threads and OpenMPI.  The three basic topics are how to create parallelism, how to shared data, and how to synchronize threads.  We use a running example called Sharks and Fish.

2001 Lecture Notes

PowerPoint, Postscript, PDF


  • An Introduction to Programming with Threads by Andrew Birrell
  • Posix Threads Tutorial from the University of Arizona.
  • Sharks and Fish code discussed in lecture
  • main.cc
  • worker.cc
  • Barrier code written using SUN threads discussed in class
  • OpenMP web page.
  • OpenMP Tutorial from LLNL