title: Implementation of monitors with semaphores
body: <p>I've been asked the following question and I'm not sure what the correct answer is to it:</p>
  
  <pre><code>If monitors are implemented by replacing condition variables with semaphores 
  (counters set to 0) with down() and up() as wait and signal, respectively,
  would the monitors work correctly?
  </code></pre>
  
  <p>I'd be tempted to say it is a correct implementation because semaphores and condition variables can replace each other, correct? Is there a better explanation?</p>