concurrent: deadlock using 2 semaphores