627 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??

1 Answer

1 votes
1 votes
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.

Related questions

3 votes
3 votes
4 answers
2
agoh asked Dec 11, 2016
1,132 views
My doubt is as follows: If deadlock is there, processes will be busy waiting in wait loop. So, decision on which process enters C.S. is not made in finite time. Hence, is...
0 votes
0 votes
0 answers
3
Aboveallplayer asked Jan 18, 2016
301 views
i am unable to understand the concept of progress and bounded waiting after many reads of galvin.... i knw the basic but how to say looking at a code that progress is sat...