Labs

LAB 1: Introduction to OpenMP Programming in C

  • The main purpose of this lab is to introduce you to writing, compiling and running OpenMP programs in C.
  • Lab Description: [PDF]
  • Source File: [pi_serial.c]

LAB 2: Barriers in OpenMP

LAB 3: Critical Regions IN OPENMP

  • The main purpose of this lab is to implement a parallel program with two queues – one storing latitudes and one storing longitudes in decimal degrees. You should manage reads/writes to each queue using independent critical regions.
  • Lab Description: [PDF]
  • Data Files: [latitude.csv] [longitude.csv]

LAB 4: Avoiding Deadlocks in Java

  • The main purpose of this lab is to learn about deadlocks – one of the main challenges in programming with threads. In this lab you are given a concurrent Java program from the IBM Concurrency Benchmark and you need to modify the program to ensure that it is deadlock free.
  • Lab Description: [PDF]
  • Data Files: [CSCI4060U_Lab04_source.zip]

LAB 5: Thread vs Process Performance in C

LAB 6: Programming with Pthreads IN C

  • The main purpose of this lab is to create a program that simulates airline ticket agents. Your program will be written in C and use the pthread.h library (including a mutex to limit access to shared data).
  • Lab Description: [PDF]

LAB 7: Simulating a Stock Exchange WITH PTHREADS IN C

  • The main purpose of this lab is to create a program that simulates a stock exchange system. Your program will be written in C and use the pthread.h library (including mutexes and condition variables). You will start the lab by familiarizing yourself with the partially implemented solution in pthread_lab7_start.c.
  • Lab Description: [PDF]
  • Data Files: [pthread_lab7_start.c]

LAB 8: Introduction to OpenCL

  • This is the first lab where you will work with OpenCL. The main goal of the lab is to learn how to compile and execute an OpenCL program using XCode on the Mac computers in the CS Undergraduate Labs.
  • Lab Description: [PDF]
  • Data Files: [OpenCL_Hello_World_Example.zip]

LAB 9: Matrix Multiplication in OPENCL

  • The main goal of this lab is to take a sequential implementation of matrix multiplication and parallelize it in OpenCL.
  • Lab Description: [PDF]
  • Data Files: [matrix_mult_seq.c]