in Operating System
1,150 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.

in Operating System
by
1.2k views

4 Comments

@Shaik Masthan Sir can you please explain how mutual exclusion is satisfied??  M getting 2 process together in critical section by preempting p1 in V(S3) and then brought P2 

what's mistske here? 

0
0

@MANSI_SOMANIV(s3) by p1 means, p1 is not out of critical section, rt?

0
0
Yes sir sorry forgot that, cz I was thinking like process still not exit as did preemption ,still in execution

But here it's out of critical section

Thanks sir
1
1

1 Answer

1 vote
1 vote
Best answer
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

1 comment

can you tell how ME is satisfied???
0
0