I know the difference between deadlock prevention and avoidance. But i want to know the difference between deadlock avoidance and detection. ?
Simply to put
Deadlock avoidance: you employ some methods to avoid the deadlock ,but prevention is more restrictive than avoidance.
Deadlock detection: Here only the detection only takes place whether the current state is in deadlock or not.
Deadlock avoidance : Suppose you have to satisfy various request for some set of instances of various resources. Currently you have sufficient available resources ,so the system can decide for each request whether or not the process should wait to avoid a possible future deadlock.Simply just to check every request that if you satisfy the request then whether deadlock will occur in future or not? if yes then don't satisfy the request.
Deadlock detection : Examines the state of the system to determine whether a deadlock has occurred.