1,043 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

1.5k
views
0 answers
0 votes
Raj Singh 1 asked Jan 1, 2019
1,501 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 ... all those problems incorrect? Or I am screwed up at my concepts?
4.6k
views
3 answers
4 votes
Na462 asked Jul 18, 2018
4,583 views
Consider the following code to solve the critical section problem for two processes P0 and P1. Initially flag [i] contain false for i = 0 and 1 ... Mutual exclusion and progressB. Mutual exclusion and bounded waitC. ProgressD. None of these
304
views
0 answers
0 votes
Akash Kumar Roy asked Mar 31, 2018
304 views
Is context switch allowed when a process is in the cirtical section? (Not preemption)If yes then how it deals with data inconsistency?
677
views
0 answers
3 votes
junk_mayavi asked Jan 2, 2018
677 views
Let 'n' processes competing to enter their critical sections and mutex be a global binary semaphore initialized to 1. The process is coded as follows:Signal( ... competition to enter as well. can we take this as progress?Please answer.