1,596 views
2 votes
2 votes

Consider the following synchronization construct used by the processes P1, P2 and P3. The S1, S2 and S3 are counting semaphore variables:
S1 = 3, S2 = 2, S3 = 1;
P (S1);
P (S2);
P (S3);
Critical section
V (S3);
V (S2);
(S1);
Which of the below statement is true?

A It satisfies mutual exclusion and progress but not bounding waiting.

B It satisfies both progress and bounded waiting but not mutual exclusion.

C It satisfies mutual exclusion and bounded waiting but not progress.

D It satisfies all the mutual exclusion, progress and bounded waiting.

1 Answer

Best answer
2 votes
2 votes
All are satisfied.

Progress is satisfied: As you see P1,P2,P3, Suppose P1 is not interested and P2 wants to get into CS then P1 won't stop to P2. So Progress is satisfied.

Bounded Waiting: Semaphores by default have a queue for blocked process but if not any scheduling algorithm mentioned(FCFS etc...) then also every process get the chance to get into CS.
selected by

No related questions found