demonstration of semaphores usage