We're covering multithreaded programming in a class I'm taking. The professor offered a bonus question that I have been trying, to no avail, to figure out:
Each of processes P0, P1, P2 and P3 have to wait for the other three to cross or reach a particular synchronization point in their code, and only then may that process cross its own synchronization point.
I already know how to answer the question with four semaphores, the hard part is doing it with only one semaphore.
Any suggestions or hints as to how to proceed?