PPLS: Demo Programs
Here is the source code for some of the demo programs we discuss in lectures. Take a copy and play around!
- Pthreads programs: Good Hello World, Bad Hello World, Good Counter, Bad Counter, Good Producer-Consumer, Bad Producer-Consumer and Jacobi
- Java programs: Hello World, Readers and Writers and Broken Readers and Writers
- MPI programs: Hello World and task farm. For the dynamic prime sieve program you need siever.c and generate.c
Below, you can also run some of these directly across the web, as done during lectures. Hit refresh to run again and see concurrency in action!
Pthreads Web Demos
- Good Hello World (in C)
- Bad Hello World (in C)
- Good Counter (in C)
- Bad Counter (in C)
- Good Producer-Consumer (in C)
- Bad Producer-Consumer (in C)
Java Web Demos
MPI Web Demos
License
All rights reserved The University of Edinburgh