168
Direct methods of deadlock prevention
nA protocol to prevent circular wait:
udefine a strictly increasing linear ordering O() for resource types. Ex:
FR1: tape drives: O(R1) = 2
FR2: disk drives: O(R2) = 4
FR3: printers: O(R3) = 7
uA process initially request a number of instances of a resource type, say Ri. A single request must be issued to obtain several instances.
uAfter that, the process can request instances for resource type Rj if and only if O(Rj) > O(Ri)