 <p>I have found the following link which is like a pseudocode, a guideline of using condition variable. I hope it will greatly help students working on their nachos project or learning pthreads.</p> <p><a href="https://computing.llnl.gov/tutorials/pthreads/#ConVarOverview" rel="nofollow">https://computing.llnl.gov/tutorials/pthreads/#ConVarOverview</a></p>