You can prepare effectively for Computer Science Engineering (CSE) GATE Computer Science Engineering(CSE) 2027 Mock Test Series with this dedicated MCQ Practice Test (available with solutions) on the important topic of "Test: IPC, Synchronization & Concurrency- 2". These 11 questions have been designed by the experts with the latest curriculum of Computer Science Engineering (CSE) 2026, to help you master the concept.
Test Highlights:
Sign up on EduRev for free to attempt this test and track your preparation progress.
At a particular time of computation, the value of a counting semaphore is 7. Then 20 P operation and ‘x’ V operation were completed on this semaphore. If the final value of the semaphore is 5, x will be
Detailed Solution: Question 1
Detailed Solution: Question 2
Each process Pi, i = 1,2, 3,...., 9 is coded as
follows:
repeat
P (mutex)
{ critical section }
V (mutex)
forever
The code for P 10 is identical except that is uses V (mutex) instead of P (mutex). What is the largest number of processes that can be inside the critical section at any moment?
Detailed Solution: Question 3
Process P1 and P2 have a producer-consumer relationship, communicating by the use of a set of shared buffers:
P1 :
repeat
obtain an empty buffer
Fill it
return a full buffer
forever
P2:
repeat
obtain a full buffer
empty it
return an empty buffer
forever
Increasing the number of buffers is likely to do which of the following?
1. Increase the rate at which requests are satisfied.
2. Decrease the likelihood of deadlock.
3. Increase the case of achieving a correct implementation.
Detailed Solution: Question 4
Consider a queue between the two processes indicated below. A/is the length of queue and e, f and b are semaphore, init : e : = N; f = 0; b : = 1;

Which of the following statements is/are true?
1. The purpose of semaphore f is to ensure that dequeue is not executed on an empty queue.
2. The purpose of semaphore e is to ensure that deadlock does not occur.
3. The purpose of semaphore b is to provide mutual exclusion for queue operations.
Detailed Solution: Question 5
Consider the following :
int numreader = 0;
mutex = semaphore (1);
room empty (1);

The above code is a proposed solution of the Readers/Writer problem.
Consider which of the following statements is/are true?
1. The code allow several writers to execute in the writers critical area at the same time
2. The code allow several readers to execute in the readers critical area at the same time.
Detailed Solution: Question 6
Processes P1 and P2 use critical_flag in the following routine to achieve mutual exclusion. Assume that critical_flag is initialized to FALSE in the main program:

Consider the follow ing statements:
1. It is possible for both P1 and P2 to access critical_region concurrently.
2. This may lead to a deadlock.
Which of the following holds?
Detailed Solution: Question 7
The following is a code with two threads, producer and consumer, that can run parallel. Further, S and Q are binary semaphore equipped with the standards P and V operations,
semaphore S - 1, Q = 0
integer x;

Which of the following is TRUE about the program above?
Detailed Solution: Question 8
Let R1, R2, R3 be reader processes and let W1 and W2 be writer processes requesting shared data. If R1 is selected for access. Which of the statement is/are correct?
1. Mutual exclusion is necessary for R2 and R3.
2. No mutual exclusion is necessary for R2 and R3.
3. Mutual exclusion must be there for W1 and W2.
4. No mutual exclusion must be there for W1 and W2.
Detailed Solution: Question 9
Assume that 'C' is counting semaphore. Consider the following program segment:
C= 10;
P(C);
V(C);
P(C);
P(C);
P(C);
V(C);
P(C);
P(C);
What is the value of 'C' at the end of the above program execution?
Detailed Solution: Question 10
At a particular time of ocmputation the value of a counting semaphore is 7. Then 20 P operations and 15 V operation were completed on this semaphore. The resulting value of the semaphore is
Detailed Solution: Question 11