in Operating System
617 views
0 votes
0 votes

LOAD Ri,M[LOCK]

CMP Ri,#0

JNZ TO STEP 1

STORE M[LOCK],#1

CRITICAL SECTION

STORE M[LOCK],#0

 

progress and bound wait satisfying or not??

in Operating System
by
617 views

2 Comments

When progress is guaranteed, the simple way to check BOUNDED WAITING is

if You are maintaining a queue ===> BOUNDED WAITING satisfied

else ===> BOUNDED WAITING not satisfied
3
3

@Shaik Masthan YA THATS A COOL PROCEDURE

0
0

1 Answer

1 vote
1 vote
Mutual exclusion is not satisfied here, Progress is satisfied here and Bounded waiting is not satisfied.

Bounded waiting is not satisfied because there is problem of starvation suppose there are three processes P0,P1 and P2.

P0 successfully set the lock variable and executed the critical section now one process from waiting list P1 acquired the lock and executed but now in waiting list there are two process P2 and P0 but there is chance that P0 can again acquired lock before acquired by P2 and this can happen infinite time by which P2 will be starve. So Bounded waiting is not satisfied.

See Mutual exclusion and progress are two primary requirement of synchronization.  To solve above problem test and set solution was introduced but that also doesn't satisfy bounded waiting.

2 Comments

THANK YOU VERY MUCH
0
0

@Shubhgupta it is ok for three processes that bounded wait is not satisfied here.
But my doubt is that how it is possible that bounded wait is not satisfied for two processes?

0
0

Related questions