Deadlocks · Operating Systems · GATE CSE

Start Practice

Marks 1

GATE CSE 2022
Consider the following threads, T1, T2 and T3 executing on a single processor, synchronized using three binary semaphore variables, S1, S2 and S3, ope...
GATE CSE 2022
Which of the following statements is/are TRUE with respect to deadlocks?
GATE CSE 2018
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...
GATE CSE 2015 Set 2
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 ...
GATE CSE 1998
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

GATE CSE 2024 Set 2
Consider a multi-threaded program with two threads T1 and T2. The threads share two semaphores: s1 (initialized to 1) and s2 (initialized to 0). The t...
GATE CSE 2021 Set 1
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 ...
GATE CSE 2019
Consider the following snapshot of a system running $n$ concurrent processes. Process $i$ is holding $X_i$ instances of a resource $\mathrm{R}, 1 \leq...
GATE CSE 2018
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...
GATE CSE 2016 Set 2
Consider a non-negative counting semaphore $$S.$$ The operation $$P(S)$$ decrements $$S,$$ and $$V(S)$$ increments $$S.$$ During an execution, $$20$$ ...
GATE CSE 2015 Set 3
Consider the following policies for preventing deadlock in a system with mutually exclusive resources. $$\,\,\,\,\,\,\,{\rm I}.$$ $$\,\,\,\,\,\,$$ Pr...
GATE CSE 2014 Set 2
Consider the procedure below for the Producer-Consumer problem which uses semaphores: semaphore n = 0; semaphore s = 1; void producer() { while(tr...
GATE CSE 2014 Set 1
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...
GATE CSE 2010
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...
GATE CSE 2009
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...
GATE CSE 2008
Which of the following is NOT true of deadlock prevention and deadlock avoidance schemes?
GATE CSE 2007
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 ...
GATE CSE 2006
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, ...
GATE CSE 2005
Suppose n processes, P1,......., Pn share m identical resource units, which can be reserved and released one at a time. The maximum resource requireme...
GATE CSE 2000
Which of the following is NOT a valid deadlock prevention scheme?
GATE CSE 1997
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...
GATE CSE 1993
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...
GATE CSE 1992
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

GATE CSE 1996
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...
GATE CSE 1994
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
Medical
NEETAIIMS
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
Staff Selection Commission
SSC CGL Tier I
CBSE
Class 12