in Operating System
1,641 views
3 votes
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??
in Operating System
1.6k views

1 comment

Progress and Bounded Waiting are independent of each other.

 

2
2

3 Answers

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

4 Comments

1
1
thanx.
0
0
what is the relation of strict alteration and progress, bounded wait ?
0
0
0 votes
0 votes
I THINK  STRICT ALTERNATION APPROACH DOES NOT SATISFY BOUNDED WAITING CONDITION
0 votes
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 

by