In deadlock avoidance, deadlocks may occur but the operating system will avoid actions thatcould lead to deadlocks.Unsafe state
A state that may lead to deadlock and must be avoided.Safe State
A state that has a scheduling order or a sequence of processes in which every process in thesequence can complete its execution.
Assume that there are three processes and ten resources of the same type. The Table below shows thecurrent resource allocation.Process Maximum needed Currently HoldingP
Used to determine if the current state of the system is safe or not.Example:A system has 4 processes and 10 resources of the same type. Assume the following resource allocationtable.Process Max[i] hold[i]P
7 3The values for the variables are:
Available= 10(1+1+2+3)=3 this is the current state of…..