Nachos operating system- you will be working with the "threads"' subsystem of NACHOS. This is the part of NACHOS that supports multiple concurrent activities within the kernel. In the exercises below, you will write some simple programs that create multiple threads, you will demonstrate the problems that arise when multiple threads perform unsynchronized access to shared data, and you will rectify these problems by introducing synchronization (in the form of semaphores) into the code. Then, you will implement the lock and condition synchronization primitives that are missing from NACHOS. Finally, you will simulate two real world synchronization problems by using the synchronization primitives.
All your work for this assignment will take place within the threads directory. Although you might find it helpful to look at files outside this directory, you should not make any changes to files other than those in the threads directory. In general, if a source code file has the following message at the beginning: