Skip to main content

PPLS - top navigation

  • Learn
  • Piazza
  • DRPS

Breadcrumb

  1. Home
  2. PPLS: Parallel Programming Languages and Systems
  3. PPLS: Course Materials

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

  • Hello World (in Java)
  • Readers-Writers (in Java)
  • Broken Readers-Writers (in Java)

MPI Web Demos

  • MPI Hello World
  • MPI Farm
License
All rights reserved The University of Edinburgh

Book traversal links for PPLS: Demo Programs

  • PPLS: Previously Recorded Lectures
  • Up
  • PPLS: Further Reading

Navigation links

  • PPLS: Course Materials
    • PPLS: Lecture Overheads and other Notes
    • PPLS: Previously Recorded Lectures
    • PPLS: Demo Programs
    • PPLS: Further Reading
  • PPLS: Assessment
RSS feed

Opencourse privacy & accessibility statements; contact Informatics, ILTS.