974 views
1 votes
1 votes

Please explain why bounded waiting is not satisfied...?

2 Answers

1 votes
1 votes
only mutual exclusion is satisfied here. Consider below situation: Initially critical section is free. Now, Lets Process Pi executes its 1st statement flag[i] = true and got preempted. Then Lets Process Pj comes and tries to execute its own while statement and as this condition is true for Pi, the process Pj keeps on busy waiting. This waiting is for Pi which is not inside in Critical section which is still free. So, process Pj can not be able to make any progress for a outside process which is not in critical section. Hence, progress is not satisfied. Now, let say, continuing as per the above situation, process Pj also preemptes after few time. Till that, Pi not comes back yet. Now, say process Pi comes and wants to execute its own while part which is also becomes true becoz of process Pj made flag[j]=true. In this situation, Process Pi is also waiting and its own progress hampers becoz of a process which is outside of critical section. Remember, Critical section is still free. So, based on the above cases, these 2 process are in deadlock while mutual exclusion condition can be still satisfied only as one process can enter in CS alone. So, correct is (A), along with that the full answer is only ME is satisfied with deadlock.
edited by
–1 votes
–1 votes

Ans is (D)

here mutual exclusion and progress both are guranteed.

bounded waiting is also guranteed. As per Operating System Concepts by Galvin, "There exists a bound on the number of times that other processes are allowed to enter their critical sections after  a process has made a request to enter its critical section and before that request is granted."

in option A they are talking about m/e only so A is wrong.

in option B they said m/e and b/w are guranteed only. means they indirectly saying progress is not guranteed. so B is wrong.

in C they said progress is satisfied only. so C also wrong.

in D they said m/e and progress guranteed. Here they didnt mention anything negative about b/w so we can not think b/w is not satisfying. therefore D is correct.

I hope you got my point.

Related questions

0 votes
0 votes
0 answers
1
Raj Singh 1 asked Jan 1, 2019
1,453 views
Many problems on gateoverflow asks whether the given code satisfies progress requirement of the solution for the critical section problem. Most of these code contain mult...
0 votes
0 votes
0 answers
3
Akash Kumar Roy asked Mar 31, 2018
288 views
Is context switch allowed when a process is in the cirtical section? (Not preemption)If yes then how it deals with data inconsistency?