Implementing Semaphores using user level threads with a Queue data structure