deadlocks condition variables and semaphores 4814581