I just want to say that this sequence of blog posts by Niall Cooling is a great, detailed discussion about mutexes and semaphores.