Readme File I synchronized my threads using one mutex and one condition variable. Each child process has its own two variables for which to find the mod. The process has a global 4-dimensional array which is used by all the threads. When a thread enters the mutex lock it has exclusive use of the array. That thread moves its values to the array, then signals the worker thread to perform MOD. The thread then reassigns the values of its variables and unlocks the mutex lock. The section of code involving the global array is the critical section. When debugging the program I ran into a strange scenario where the program would sometimes get stuck before compputing all of the GCDs. This was because the thread was signalling the worker thread that it was finished before the worker thread was ready for it. I fixed this by placing the signal instruction inside a spinlock that I was using to avoid race conditions with the global array. This solution worked well.