Deadlock (Basic Level) - 1

9 Questions MCQ Test Mock Test Series - Computer Science Engg. (CSE) GATE 2020 | Deadlock (Basic Level) - 1

This mock test of Deadlock (Basic Level) - 1 for Computer Science Engineering (CSE) helps you for every Computer Science Engineering (CSE) entrance exam. This contains 9 Multiple Choice Questions for Computer Science Engineering (CSE) Deadlock (Basic Level) - 1 (mcq) to study with solutions a complete question bank. The solved questions answers in this Deadlock (Basic Level) - 1 quiz give you a good mix of easy questions and tough questions. Computer Science Engineering (CSE) students definitely take this Deadlock (Basic Level) - 1 exercise for a better result in the exam. You can find other Deadlock (Basic Level) - 1 extra questions, long questions & short questions for Computer Science Engineering (CSE) on EduRev as well by searching above.

Dijkstra’s banking algorithm in an operating system performs


Banker’s algorithm resources will only be allocated if system will remain in SAFE state (DEADLOCK can’t occur if system is in SAFE state), so performing DEADLOCK AVOIDANCE.


Necessary conditions for deadlock are


For deadlock four necessary condition are to be met
(i) Mutual exclusion
(ii) Non-preemption
(iii) Circular wait
(iv) Partial allocation [Bounded waiting]


Which of the following statements is not true?


Deadlock can’t take place if resources must be requested in same order by process. For deadlock, circular wait is a must condition.


Suppose we have a system in which processes is in hold and wait condition then which of the following approach prevent the deadlock.


To ensure that deadlock will not occur in a system in which processes are in HOLD and WAIT condition, a process requires to request all resources before it begins execution, or allow process to request resources only when the process has no other resources already allocated.


Referring to below system state diagram how many resources are available?

1. One instance of resource R1.
2. Two instance of resource R2.


From the given RAG we can observe that there are 2 instance of R2 and a single instance process P1 holding resource R1, and requesting for resource R2. Process P2 is requesting for resource R1 and Resource R2.
Hence at the given time both the instances of resource R2 are available.


An operating system makes use of Banker’s algorithm to allocate 12 printers. Printers will be allocated to a process requesting them only if  there are enough available printers to allow it to run to completion.
User 1 using 7 printers and will need at most a total of 10 printers.
User 2 is using 1 printer and will need at most 4 printers.
User 3 is using 2 printers and will need at most 4 printers.
Each user is currently requesting 1 more printer, Which of the following is true?


Total printers = 12
Printers allocated to user 1, user 2 and user 3 are 7, 1 and 2 respectively

So, only safest sequence is V3 first then either or V3. So, operating system will grant printer to user 3 only.


A state is safe if the system can allocate resources to each process (up to its maximum) in some order and still avoid deadlock, which of the following is/are true
1. Deadlocked state is unsafe,
2. Unsafe state may lead to a deadlock situation.
3. Unsafe state must lead to a deadlock situation.
4. Deadlock state is a subset of unsafe state,


(i) Deadlock is unsafe state
(ii) The unsafe state may lead to deadlock.
(iii) Clearly deadlock state is subset of unsafe state.
Its not compulsory that unsafe state always result in deadlock


Which of the following is NOT true of deadlock prevention and deadlock avoidance schemes?


Deadlock prevention scheme handles the dead lock by confirms that either of the four necessary condition for deadlock doesn’t occur. Hence a resource request may not be granted even if the resulting state is safe.


An operating system implements a policy that requires a process to release all resources before making a request for another resource.


The given operating system follows DEAD LOCK prevention policy which also ensures neither starvation nor deadlock can occur.

Related tests