Final Task#1
Final Task#1
2. What are the ways to deal or solve the Deadlock problem in OS?
Detection and recovery: Use deadlock detection algorithms to
determine whether a deadlock has occurred. Once detected, the
system can take steps to recover from the impasse, such as
terminating one or more processes or reversing their actions.
Resource Ordering: Create a protocol for the order in which
resources should be acquired. Deadlocks can be significantly
decreased by guaranteeing that processes receive resources in the
same order every time.
Timeouts: Set timeouts for resource requests. If a process is unable to
acquire a resource within a given time limit, it can release the
resources it is presently holding and try again later.
Resource Preemption: If a deadlock arises, carefully intercept
resources from processes in a way that breaks the impasse while
causing minimal disturbance.