operating systems – Different ways to avoid deadlocks

Cheers, so I was thinking of ways that we can implement, in order to avoid deadlocks in processes. While I am aware of some tactics, e.g. killing a process when we reach a deadlock, or using spooling, would there be any other viable solutions? For example, can we adjust a process to be executed if it urgent, and has higher priority for execution, or maybe execute a process which asks for the smallest amount of resources? Or even depending on the resource, we remove it from a process which has reached a deadlock and then re-use it by giving it again on the processes? Thanks