Q: 1 Which of the following is a scheme for deadlock avoidance?
Manipulate to find at least one safe path
Requesting all resources at once and keep other task waiting
Pre-emption
Resource ordering
[ Option A ]
Deadlock Avoidance is a method used by an operating system to ensure that a system never enters a deadlock state. In deadlock avoidance, the OS makes decisions dynamically by checking whether allocating a requested resource will keep the system in a safe state.
A safe state means that there is at least one sequence in which all processes can complete their execution without getting stuck waiting for each other. The Banker’s Algorithm is a well-known example of deadlock avoidance that works by finding at least one safe sequence before granting a request.
Q: 2 Consider the resource allocation graph. “This system is always in deadlock state.” This remark is :

True
False
Unpredictable
Impossible to determine
[ Option B ]
The given resource allocation graph shows two resources, R₁ and R₂, each having two instances, and four processes, T₁, T₂, T₃, and T₄. In this graph, T₁ is waiting for an instance of R₁, while T₂ and T₃ are already holding instances of R₁. Similarly, T₄ is holding an instance of R₂, and T₁ is requesting it.
Since both resources have multiple instances available, all processes can still be allocated resources without creating a circular wait. Therefore, the system is not always in a deadlock state, and the statement that it is always in deadlock is false.
Q: 3 Consider a system with five processes P0 to P4 and three resource types A, B, C. suppose that, at time T0, the following snapshot of the system has been taken:
| Allocation | Need | Available | |
|---|---|---|---|
| ABC | ABC | ABC | |
| P0 | 010 | 743 | 230 |
| P1 | 302 | 020 | |
| P2 | 302 | 600 | |
| P3 | 211 | 011 | |
| P4 | 002 | 431 |
Check whether a request for (0,2,0) by P0 can be granted according to Banker’s Algorithm?
Yes (Request can be granted)
No (Request cannot be granted)
Cannot be decided
Resulting state is safe
[ Option B ]
Banker’s Algorithm is used in operating systems to avoid deadlock by ensuring that resource allocation keeps the system in a safe state.
Steps to check if a request can be granted:
Thank you so much for taking the time to read my Computer Science MCQs section carefully. Your support and interest mean a lot, and I truly appreciate you being part of this journey. Stay connected for more insights and updates! If you'd like to explore more tutorials and insights, check out my YouTube channel.
Don’t forget to subscribe and stay connected for future updates.