Back to the 2024 paper

Module 4: Deadlocks

20247m

Explain the core principle behind Deadlock Avoidance. Draw a Resource-allocation graph with a cycle but no deadlock.

Worked SolutionAI Assisted

Deadlock Avoidance Principle

Requires safe state check before grant. Resource allocation graph with cycle but no deadlock: use multiple instances. Example: 2 instances of R1, P1 holds R1, P2 holds R1, P1 requests R2, P2 requests R2 held elsewhere — cycle exists but extra instance breaks deadlock. Draw RAG with cycle and extra resource free.

Similar questions

Budget AppAndroid App

Pocketly on Android

Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.