A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

Discussion Forum

Que. Suppose S and Q are two semaphores initialized to 1. P1 and P2 are two processes which are sharing resources.

P1 has statements                 P2 has statements
wait(S) ;                                     wait(Q) ;
wait(Q) ;                                     wait(S) ;
critical section1;                       critical section 2;
signal(S) ;                                 signal(Q) ;
signal(Q) ;                                 signal(S) ;

Their execution may sometimes lead to an undesirable situation called
a. Starvation
b. Race condition
c. Multithreading
d. Deadlock
Answer:Deadlock
Confused About the Answer? Ask for Details Here
Know Explanation? Add it Here

Similar Questions: