in Operating System
918 views
1 vote
1 vote

a)Mutual exclusion, progress, bounded wait all are satisfied

b)Mutual exclusion, progress satisfied but bounded wait not satisfied

c)Mutual exclusion satisfied progress, bounded wait not satisfied

in Operating System
by
918 views

4 Comments

is there any kind of ready queue is maintained before entering Critical section?? 

@srestha mam    

0
0
B should be the answer
1
1
So, counting semaphore satifies the condition of bounded wait then, from what you have written.
0
0

1 Answer

0 votes
0 votes

Option B is correct

Suppose P1 is executing critical section now,

According to definition of bounded waiting, After a process (say P2) made a request to enter its critical section and before it is granted the permission to enter, there exists a bound on the number of turns other process( P1) are allowed to enter.

But here process P1 can enter critical section again and again without giving process P2 a chance. hence bounded waiting is not satisfied.

1 comment

I think bounded wait is not satisfied here.

Lets start with the definition=>  There exists a limit as to how many other processes can get into their critical sections after a process requests entry into their critical section and before that request is granted.(One process is in critical section another process is waiting to enter,show that if the first process exits the critical section and attempts to re-enter it couldn’t or there is a finite number of time it can re-enter while the other processes are waiting)

Source-https://www.cs.uic.edu/~jbell/CourseNotes/OperatingSystems/5_Synchronization.html

P1 enters in Critical section makes the variable S1=2,S2=1,S3=0 while P1 is in cs another process P2 tries to enter make the variable S1=1,S2=0 and gets stuck during S3. 

P1 exits the cs and tries to re-enter the cs it modifies the variable S1=2,S2=1,S3=0  while P2 is still busy waiting now P2 can enter cs but lets give p1 a chance p1 enters start executing the instruction modifies the variable  to S1=1,S2=0 and gets stuck during S3.So it can’t re-enter again.

 

0
0