Another standard synchronization problebm is the readers-writers problem. Here we have some sort of data structure to which any number of threads may have simultaneous access, as long as they are just reading. But if a thread is to write in the data structure, it must have exclusive access.
Part 2 of your program assignment is exactly this.