1
GATE CSE 2022
MCQ (Single Correct Answer)
+1
-0.33

Consider the following threads, T1, T2 and T3 executing on a single processor, synchronized using three binary semaphore variables, S1, S2 and S3, operated upon using standard wait( ) and signal( ). The threads can be context switched in any order and at any time.

$${T_1}$$ $${T_2}$$ $${T_3}$$
while (true) {
wait ($${S_3}$$);
print ("C");
signal ($${S_2}$$); }
while (true) {
wait ($${S_1}$$);
print ("B");
signal ($${S_3}$$); }
while (true) {
wait ($${S_2}$$);
print ("A")
signal ($${S_1}$$); }

Which initialization of the semaphores would print the sequence BCABCABCA....... ?

A
S1 = 1; S2 = 1; S3 = 1
B
S1 = 1; S2 = 1; S3 = 0
C
S1 = 1; S2 = 0; S3 = 0
D
S0 = 1; S2 = 1; S3 = 1
2
GATE CSE 2022
MCQ (More than One Correct Answer)
+1
-0.33

Which of the following statements is/are TRUE with respect to deadlocks?

A
Circular wait is a necessary condition for the formation of deadlock.
B
In a system where each resource has more than one instance, a cycle in its wait for graph indicates the presence of a deadlock.
C
If the current allocation of resources to processes leads the system to unsafe state, then deadlock will necessarily occur.
D
In the resource-allocation graph of a system, if every edge is an assignment edge, then the system is not in deadlock state.
3
GATE CSE 2018
Numerical
+1
-0
Consider a system with $$3$$ processes that share $$4$$ instances of the same resource type. Each process can request a maximum of $$K$$ instances. Resource instances can be requested and released only one at a time. The largest value of $$K$$ that will always avoid deadlock is ____.
Your input ____
4
GATE CSE 2015 Set 2
MCQ (Single Correct Answer)
+1
-0.3
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 of N could lead to a deadlock?
A
1
B
2
C
3
D
6
GATE CSE Subjects
Software Engineering
Web Technologies
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
CBSE
Class 12