Exams › GATE › Technical
Consider the methods used by processes P1 and P2 for accessing their critical sections whenever needed, as given below. The initial values of shared boolean variables S1 and S2 are randomly assigned.
Method used by P1
while (S1 == S2);
Critical Section
S1 = S2;
Method used by P2
while (S1 != S2);
Critical Section
S2 = not(S1);
Which one of the following statements describes the properties achieved?
- Mutual exclusion but not progress
- Progress but not mutual exclusion
- Neither mutual exclusion nor progress
- Both mutual exclusion and progress
Correct answer: Mutual exclusion but not progress
Solution
The methods used by P1 and P2 ensure that only one process can enter its critical section at a time, achieving mutual exclusion. However, if both processes are waiting for the other to leave its critical section, they can end up in a deadlock situation, which means progress is not guaranteed.
Related GATE Technical questions
- Which of the following concurrency control protocols ensure both conflict serializability and freedom from deadlock?
I. 2-phase locking
II. Time-stamp ordering
- A system uses FIFO policy for page replacement. It has 4 page frames with no pages loaded to begin with. The system first accesses 100 distinct pages in some order and then accesses the same 100 pages but now in the reverse order. How many page faults will occur?
- The three-dimensional state of stress at a point is given by σ = [[10, 0, 0],[0, 40, 0],[0, 0, 0]] MPa. The maximum shear stress at the point is
- A 2 m wide strip footing is founded at a depth of 1.5 m below the ground level in a homogeneous pure clay bed. The clay bed has unit cohesion of 40 kPa. Due to seasonal fluctuations of water table from peak summer to peak monsoon period, the net ultimate bearing capacity of the footing, as per Terzaghi’s theory, will
- Consider the statements P and Q.
P: Soil particles formed by mechanical weathering, and close to their origin are generally subrounded.
Q: A activity of the clay physically signifies its swell potential.
Which one of the following options is CORRECT?
- The number of degrees of freedom for a natural open channel flow with a mobile bed is
⚔️ Practice GATE Technical free + battle 1v1 →