2,884 views
3 3 votes
DOES STRICT ALTERNATION APPROACH SATISFY BOUNDED WAITING CONDITION??

INT TURN;(RANDOMLY ASSIGNED)

---P1----     

WHILE(TURN !=0);

CRITICAL SECTION...

TURN=1;

---P2---

WHILE(TURN!=1);

CRITICAL SECTION

TURN=0;

PS: Though this methods has strict alternation but if the process which has its turn to enter CS, doesnt want to enter the critical section , it will never ever give a chance to another process to enter CS, hence progress violated. But what about bounded wait condition ?? It also fails right??

3 Answers

Best answer
1 1 vote
Bound and waiting is independent of progress. Strict alteration definitely satisfy the bound and waiting and even the bound and waiting will be 1.
• selected by
0 0 votes

If process 1 gets the turn and enters into critical section and after completion if it's preempted then when P2 tries to enter then it can't right .so from this point  P2 don't know how much time to wait .so ,i think we can conclude that strict alteration  enters into UNBOUNDED WAITING 

Position:
Show:

Related questions

3 3 votes
1 1 answer
268
268 views
GO Classes asked Jul 25
268 views
Which of the following statements are correct?Mutual exclusion ensures that if one process is executing in its critical section, no other process can execute in its criti...
2 2 votes
3 3 answers
329
329 views
0 0 votes
1 1 answer
593
593 views
0 0 votes
0 0 answers
444
444 views
air1air2 asked Nov 29, 2024
444 views
Does this satisfy bounded waiting .The answer is given it does not satisfies bounded waiting but if P0 exits the critical section and p1 want to enter then the cs gets bl...