GATE CSE
Operating Systems
Deadlocks
Previous Years Questions

Marks 1

Consider the following threads, T1, T2 and T3 executing on a single processor, synchronized using three binary semaphore variables, S1, S2 and S3, ope...
Which of the following statements is/are TRUE with respect to deadlocks?
Consider a system with $$3$$ processes that share $$4$$ instances of the same resource type. Each process can request a maximum of $$K$$ instances. Re...
A system has 6 identical resources and N processes competing for them. Each process can request atmost 2 resources. Which one of the following values ...
A computer has six tape drives, with n processes competing for them. Each process may need two drives. What is the maximum value of n for the system t...

Marks 2

Consider the following pseudocode, where S is a semaphore intialized to 5 in line#2 an counter is a shared variable intialized to 0 in line#1. Assume ...
In a system, there are three types of resources: $$E, F$$ and $$G.$$ Four processes $${P_0},$$ $${P_1},$$ $${P_2}$$ and $${P_3}$$ execute concurrentl...
Consider a non-negative counting semaphore $$S.$$ The operation $$P(S)$$ decrements $$S,$$ and $$V(S)$$ increments $$S.$$ During an execution, $$20$$ ...
Consider the following policies for preventing deadlock in a system with mutually exclusive resources. $$\,\,\,\,\,\,\,{\rm I}.$$ $$\,\,\,\,\,\,$$ Pr...
Consider the procedure below for the Producer-Consumer problem which uses semaphores: semaphore n = 0; semaphore s = 1; void producer() { while(tr...
An operating system uses the Banker’s algorithm for deadlock avoidance when managing the allocation of three resource types X, Y, and Z to three proce...
A system has n resources R0,.....,Rn-1, and k processes P0,.....,Pk-1. The implementation of the resource request logic of each process Pi, is as foll...
Consider a system with 4 types of resources R1 (3 units), R2 (2 units), R3 (3 units), R4 (2 units). A non-preemptive resource allocation policy is use...
Which of the following is NOT true of deadlock prevention and deadlock avoidance schemes?
A single processor system has three resource types X, Y and Z, which are shared by three processes. There are 5 units of each resource type. Consider ...
Consider the following snapshot of a system running n processes. Process i is holding xi instances of a resource R, for $$1 \le i \le n$$. Currently, ...
Suppose n processes, P1,......., Pn share m identical resource units, which can be reserved and released one at a time. The maximum resource requireme...
Which of the following is NOT a valid deadlock prevention scheme?
An operating system contains 3 user processes each requiring 2 units of resource R.The minimum number of units of R such that no deadlocks will ever a...
Consider a system having m resources of the same type. These resources are shared by 3 processes A, B and C, which have peak demands of 3, 4 and 6 res...
A computer system has 6 tape drives, with n process completing for them. Each process may need 3 tape drives. The maximum value of n for which the sys...

Marks 5

A computer system uses the Banker’s Algorithm to deal with deadlocks. Its current state is shown in the tables below, where P0, P1, P2 are processes a...
Consider the resource allocation graph given in the figure. (a) Find if the system is in a deadlock state. (b) Otherwise, find a safe sequence....
EXAM MAP
Joint Entrance Examination
JEE MainJEE AdvancedWB JEE
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Medical
NEET