2 votes 2 votes I don't know how to check for bounde wait. How does it fails. please explain taking this question as example. Operating System made-easy-test-series operating-system process-synchronization + – Lucky sunda asked Jan 7, 2017 • edited Mar 6, 2019 by adeebafatima1 Lucky sunda 1.6k views answer comment Share Follow See all 30 Comments See all 30 30 Comments reply santhoshdevulapally commented Jan 7, 2017 reply Follow Share S1=3 ,S2=2 S3=1 In Bounded waiting there must be bound on process to get a chance to enter into CS If we execute three process at a time all are entering and make S1=0. If we execute second opearation i.e)S2 only two process are entering and one is struct. // S2=0 Execute third opeartion S3 only one process enter the CS other is struct here. When executed process leave the CS it is not allowed immediately because S1=0 and make S3=1. whichever process is strct at S3 i.e)is allowed. So we can say there is bound to get chance. Ex:p1,p2,p3(arriving order) P1(CS),P2(strck on S2) and P3(struck on S1) after sequence is P2 (enter Cs) follwed by P3.... 2 votes 2 votes Lucky sunda commented Jan 7, 2017 reply Follow Share ok..thanks for explaining :) 1 votes 1 votes Rahul Jain25 commented Jan 17, 2017 reply Follow Share Consider a process does P(s1) and then P(s2) now another process comes and it goes repeatedly in CS section, so bounded wait should also not be satisfied, right??? But progress should be satisfied, I think, bcoz only those process that want to enter CS take part in decision and when no process is in CS other process is not denied. 1 votes 1 votes papesh commented Jan 18, 2017 reply Follow Share @Vijaycs If you closely observe it is same as lock variable with constraints of a semaphore. Since S2 and S3 will not affect over here. Whatever the value has been assigned to S3 and S2 only one process can enter into the critical section. 0 votes 0 votes Kapil commented Jan 21, 2017 reply Follow Share What is the explaination given by ME for D)...? 0 votes 0 votes jatinmittal199510 commented Jan 21, 2017 reply Follow Share They didn't give any explaination :D I think it should not be bounded waiting, but if we think like the code isn't present within 'while(true)' , then the waiting is necessarily bounded. So my doubt is whether we should consider while(true) by ourselves or not? 0 votes 0 votes Kapil commented Jan 21, 2017 reply Follow Share If while (True) is not there, there is no need to assume. 0 votes 0 votes jatinmittal199510 commented Jan 21, 2017 reply Follow Share then it's bounded waiting. m I right? 0 votes 0 votes Kapil commented Jan 21, 2017 reply Follow Share Yes .. 0 votes 0 votes Sushant Gokhale commented Jan 22, 2017 reply Follow Share Even if "While(true)" is there, still it would satisfy bounded waiting 0 votes 0 votes Rahul Jain25 commented Jan 22, 2017 reply Follow Share If while was used then no bounded wait, otherwise bounded wait satisfied, progress is stasfied anyway while used or not same for mutual exclusion. 1 votes 1 votes Sushant Gokhale commented Jan 22, 2017 reply Follow Share @Rahul. Could you explain that if while was used, why the bounded wait be dissatisfied? 0 votes 0 votes Rahul Jain25 commented Jan 22, 2017 reply Follow Share Consider a situation Process1 comes and does P(s1) and p(s2) and then another process comes and repeatedly goes in CS and during that if process1 tries it is blocked. 0 votes 0 votes Sushant Gokhale commented Jan 22, 2017 reply Follow Share So you are keeping out Process 1 out of race. Thats not BW def. BW says that when processes are competing, if it happens that any process never gets a resource then BW is hampered. Now, where does your situation fit here? 0 votes 0 votes Sushant Gokhale commented Jan 22, 2017 reply Follow Share Basically , process 1 is blocked on S3. SO, when other process get out, Process 1 will be signalled. 0 votes 0 votes Rahul Jain25 commented Jan 22, 2017 reply Follow Share Bounded wait says when a process wants to enter CS it can be denied only a finite no. Of times or we can say there is a bound on other processes entering CS. 0 votes 0 votes Rahul Jain25 commented Jan 22, 2017 reply Follow Share Yes signlling is done and that is why progress is satisfied. 0 votes 0 votes Sushant Gokhale commented Jan 22, 2017 reply Follow Share Your 2nd def is incorrect. See this https://gateoverflow.in/39719/gate-2016-1-50#c75224 Let me check for 1st def and tell you. 0 votes 0 votes Sushant Gokhale commented Jan 22, 2017 reply Follow Share @Rahul. The situation which you have put forth is quite a possible scenario. So, you are true. If while is there BW may not be satisfied. But I still doubt. The reason is if queue is maintained for blocked processes on S3, then it would surely satisfy BW 0 votes 0 votes Rahul Jain25 commented Jan 22, 2017 reply Follow Share We can't assume queue is there. Anyway here BW is not satisfied. If we use queue then order of execution becomes sequential i.e. first come first served. Which is not required always. 0 votes 0 votes Sushant Gokhale commented Jan 22, 2017 reply Follow Share Yes, ur right. The short term scheduler woul decide which to schedule once any blcoked process is unblocked and not necessarily in FCFS. Anyways, thanks for explanation :) 0 votes 0 votes vishwa ratna commented Jan 29, 2017 i edited by vishwa ratna Jan 29, 2017 reply Follow Share I think D is right Option , obviously Mutual exclusion is guaranteed. 0 votes 0 votes Sushant Gokhale commented Jan 29, 2017 reply Follow Share its guranted. Could you tell why its not? 0 votes 0 votes Surajit commented Jan 29, 2017 reply Follow Share Why mutual exclusion not valid? Suppose I take 3 process runs in parallel all decreases S1 value from 3 to 0,then 2 process decrease S2 value 2 to 0 and S3 is 1 only so only one process can down all S1 and S2 and S3 value to 0 and enter CS.Other process will be looping before CS. 0 votes 0 votes vishwa ratna commented Jan 29, 2017 reply Follow Share I see now... Mutual exclusion is gaurantee. 0 votes 0 votes Arnabi commented Jan 29, 2017 reply Follow Share Sushant pls explain how mutual exclusion is guaranteed.. 0 votes 0 votes Sushant Gokhale commented Jan 29, 2017 reply Follow Share Had S3>=2 then more than 2 processes could enter the CS. But, S3=1 which implies only 1 process can enter CS. Simple. 0 votes 0 votes DroidX commented Apr 8, 2017 reply Follow Share How bounded waiting is satisfied? 2 votes 2 votes nikkey123 commented Sep 26, 2017 reply Follow Share plz explain progress in this question 0 votes 0 votes nikkey123 commented Sep 26, 2017 reply Follow Share plz explain progress on this question 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes bounded waiting is satisfied as each process has bounded wait of atmost of 2 process(at worst case)..even if a process comes out of cs and again wishes for CS then it has bounded wait of atmost 2 process ..hence bounded waiting satisfied G Phalkey answered Jan 13, 2019 G Phalkey comment Share Follow See all 0 reply Please log in or register to add a comment.