...
GATE 2010
March 13, 2025
GATE 2010
March 13, 2025
GATE 2010
March 13, 2025
GATE 2010
March 13, 2025

GATE 2010

Question 23

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.

Which one of the following statements describes the properties achieved?

A
Mutual exclusion but not progress
B
Progress but not mutual exclusion
C
Neither mutual exclusion nor progress
D
Both mutual exclusion and progress
Question 23 Explanation: 
In this mutual exclusion is satisfied because at any point of time either S1 = S2 or S1 ≠ S2, but not both. But here progress is not satisfied because suppose S1 = 1 and S2 = 0 and P1 is not interested to enter into critical section but P2 wants to enter into critical section, and P2 will not be able to enter, because until P1 will not enter critical section, S1 will not become equal to S2. So if one process is not interested in entering the critical section, it will not allow the other process to enter the critical section which is interested. So progress is not satisfied.
Correct Answer: A
Question 23 Explanation: 
In this mutual exclusion is satisfied because at any point of time either S1 = S2 or S1 ≠ S2, but not both. But here progress is not satisfied because suppose S1 = 1 and S2 = 0 and P1 is not interested to enter into critical section but P2 wants to enter into critical section, and P2 will not be able to enter, because until P1 will not enter critical section, S1 will not become equal to S2. So if one process is not interested in entering the critical section, it will not allow the other process to enter the critical section which is interested. So progress is not satisfied.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x