both levels of semaphores