in Operating System
924 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
924 views

9 Comments

Is answer A)??
0
0
Yes..

But i am not getting why is bounded wait satisfied? Is that because each process will run only once so all process will definitely be executed?

If we allow each process to run as many times as they want will bounded wait be satisfied?
0
0
@Hirak
What bounded waiting actually means?

It means there must be a bound after how much time a process can get CS.

And here each process has a bound

right?
0
0
Say at first P1 goes into the <CS> and P2 is blocked in S2 and P3 in S1. therefore S1=0,S2=0,S3=0 currently.

when P1 exists then S1=1,S2=1,S3=1. Here i am facing the doubt.. since S2,S3,S1 all are one can P1 again enter the <CS> at the very same moment,again? (if so then bounded waiting can never be satisfied) Or since P2 and P3 are blocked they are already in the queue and P1 will be added after them?
1
1
yes 2nd one is the right cause

Say if P1 want to enter 1st, then P2 and  P3 requested after that

So, After P1 exit the C.S. , it only can  enter  after P3 in the ready queue.

B.W. satisfied here
2
2
ok.. Thanks.. :)
0
0

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