Overview

The purpose of this project is to gain experience working with threads and locks within C/C++. This project will help you to understand the subtleties of integrating mutual exclusion and potential bugs that could arise if one does not pay close attention to the implementation.

Learning Objectives

  1. Create multiple working threads.
  2. Initialize locks the proper way and destroy them when done.
  3. Understand how to keep critical sections as small as possible.
  4. Prevent deadlocks.

Getting Started

Starter Code:

project3-banking.zip

  1. Download the starter code.
  2. Unzip the project3-banking.zip with the following command unzip -d PROJECT project3-banking.zip. This will create a new directory called PROJECT. You can replace PROJECT with a directory name of your choice.
  3. cd into the PROJECT directory and investigate the project.

If you follow the above steps correctly, you should have the following folder structure after unzipping (assuming the project name is "PROJECT"):

PROJECT/
  include/
  lib/
  obj/
  src/
  test/
  Makefile

After you have the code extracted you should go ahead and investigate. You can run make from the command line and your project will build and produce potential error results. See more information below.

Code Structure

This exercise contains the following important folders: