This question is in continuation with questions #117 & #119.
Question #122: Is there any way by which both processes can finish without having deadlock.
Options:
- No, there will always be a deadlock.
- Yes, A and B can proceed in any way, and there won’t be a deadlock ever.
- After reaching ‘t’, A has to proceed till I4 and only then B should proceed.
- After reaching ‘t’, A can reach till I3, then B can reach till I8 and then A can finish.
Solution: The correct answer is option 3rd. Either A or B has to finish first and only then other process should start to avoid deadlock.
