To avoid circular wait, it is possible to impose a total ordering to all resource classes: Hierarchical Resource Usage (HRU) This technique imposes a total ordering relationship between the various types of resources, associating to each of them an integer number. It forces each process to request the resource with an increasing order of enumeration (or any other type of ordering). Let F be the function that imposes a unique order among all system resources Ri. A process P can request an instance of the resource Rk if and only if F(Rk) > F(Ri) where Ri is the type of resource that was requested before Rk. Otherwise, the process must release all the resources of type Ri for which F(Rk) <= F(Ri) Demonstration: reduction to absurdity ------------------------ Suppose a set of processes {P0, P1, ..., Pn} in circular wait. Then F(Rk) < F(Rk+1), for each k = 0 .. n-1 that is F(R0) < F(R1) < ...< F(Rn) < F(R0) then follows F(R0) < F(R0) which is absurd.