Implementing the counting semaphore using
binary semaphores: A 3 semaphore solution
 

Benchmark synchronization problems

The Producer/Consumer Problem
The Readers and Writers Problem
The Dining Philosophers Problem