OS-Assignment-3 Deadlock CSE G
OS-Assignment-3 Deadlock CSE G
2022-23-EVEN SEMESTER
IV SEMESTER CSE-G
OPERATING SYSTEMS
ASSIGNMENT ON DEADLOCK
1. What is Deadlock? What are the four essential conditions for deadlock to occur?
2. Consider a system consisting of many processes and multiple resource types with
multiple /single instances of each type. Write a function in ‘C’ to check whether
the system is safe or not? (Use Bankers Algorithm). Assume that the data
structures required are global.
3. Consider a system with the following current resource-allocation state:
There are five processes P0, P1,P2,P3,P4 and three resource types: A,B,C and D.
For each process, the current allocation and the maximum required allocation
are given by the ALLOCATION and MAX matrices. The current available resources
are given by the AVAILABLE vector.