If any process has highest priority over all the resources then it can snatch any resource from any other process and so no deadlock can occur with another process as this highest priority process will eventually finish and release all the resources for the other less priority process.
In case of (I) and (II) process $1$ has given highest priority over all the resources and hence deadlock cannot occur.
Similarly, in the case of (III) and (IV) process $2$ has given highest priority over all the resources and hence deadlock cannot occur.
If we consider option (A) (I) and (IV)
- $T_{11} > T_{21}$ // for resource 1, process 1 has the highest priority
- $T_{22} > T_{12}$ // for resource 2 , process 2 has highest priority
Let $P_1$ be holding $R_1$ and waiting for $R_2.$
Let $P_2$ be holding $R_2$ and waiting for $R_1.$
This is deadlock as neither is releasing its held resources.
Similarly in option B also deadlock can occur.
Correct answer : C