when multiple processes compete for exclusive access to shared resources, a deadlock can occur. deadlocks…