Menu

Process Synchronization Questions

MCQ
31.
What are the two kinds of semaphores?
forum Discussion
MCQ
32.
What is a mutex?
forum Discussion
MCQ
33.
At a particular time of computation the value of a counting semaphore is 7.Then 20 P operations and 15 V operations were completed on this semaphore. The resulting value of the semaphore is? (GATE 1987)
forum Discussion
MCQ
34.
A binary semaphore is a semaphore with integer values ____________
forum Discussion
MCQ
35.
The following pair of processes share a common variable X.
Process A
int Y;
A1: Y = X*2;
A2: X = Y;   
 
Process B
int Z;
B1: Z = X+1;
B2: X = Z;
X is set to 5 before either process begins execution. As usual, statements within a process are executed sequentially, but statements in process A may execute in any order with respect to statements in process B. How many different values of X are possible after both processes finish executing?
forum Discussion
MCQ
36.
The program follows to use a shared binary semaphore T.
Process A  
int Y;            
A1: Y = X*2;      
A2: X = Y;        
signal(T);        
 
Process B
int Z;
B1: wait(T);
B2: Z = X+1;
X = Z;
T is set to 0 before either process begins execution and, as before, X is set to 5. Now, how many different values of X are possible after both processes finish executing?
forum Discussion
MCQ
37.
Semaphores are mostly used to implement ____________
forum Discussion
MCQ
38.
Spinlocks are intended to provide __________ only.
forum Discussion
MCQ
39.
The bounded buffer problem is also known as ____________
forum Discussion
MCQ
40.
In the bounded buffer problem, there are the empty and full semaphores that ____________
forum Discussion