2 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 4.5k views answer comment Share Follow Print See all 30 Comments 30 30 Comments reply santhoshdevulapally commented Jan 7, 2017 reply Follow flag 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 2 replyShare Lucky sunda commented Jan 7, 2017 reply Follow flag ok..thanks for explaining :) 1 1 replyShare Rahul Jain25 commented Jan 17, 2017 reply Follow flag 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 1 replyShare papesh commented Jan 18, 2017 reply Follow flag @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 0 replyShare Kapil commented Jan 21, 2017 reply Follow flag What is the explaination given by ME for D)...? 0 0 replyShare jatinmittal199510 commented Jan 21, 2017 reply Follow flag 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 0 replyShare Kapil commented Jan 21, 2017 reply Follow flag If while (True) is not there, there is no need to assume. 0 0 replyShare jatinmittal199510 commented Jan 21, 2017 reply Follow flag then it's bounded waiting. m I right? 0 0 replyShare Kapil commented Jan 21, 2017 reply Follow flag Yes .. 0 0 replyShare Sushant Gokhale commented Jan 22, 2017 reply Follow flag Even if "While(true)" is there, still it would satisfy bounded waiting 0 0 replyShare Rahul Jain25 commented Jan 22, 2017 reply Follow flag 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 1 replyShare Sushant Gokhale commented Jan 22, 2017 reply Follow flag @Rahul. Could you explain that if while was used, why the bounded wait be dissatisfied? 0 0 replyShare Rahul Jain25 commented Jan 22, 2017 reply Follow flag 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 0 replyShare Sushant Gokhale commented Jan 22, 2017 reply Follow flag 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 0 replyShare Sushant Gokhale commented Jan 22, 2017 reply Follow flag Basically , process 1 is blocked on S3. SO, when other process get out, Process 1 will be signalled. 0 0 replyShare Rahul Jain25 commented Jan 22, 2017 reply Follow flag 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 0 replyShare Rahul Jain25 commented Jan 22, 2017 reply Follow flag Yes signlling is done and that is why progress is satisfied. 0 0 replyShare Sushant Gokhale commented Jan 22, 2017 reply Follow flag 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 0 replyShare Sushant Gokhale commented Jan 22, 2017 reply Follow flag @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 0 replyShare Rahul Jain25 commented Jan 22, 2017 reply Follow flag 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 0 replyShare Sushant Gokhale commented Jan 22, 2017 reply Follow flag 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 0 replyShare vishwa ratna commented Jan 29, 2017 i edited by vishwa ratna Jan 29, 2017 reply Follow flag I think D is right Option , obviously Mutual exclusion is guaranteed. 0 0 replyShare Sushant Gokhale commented Jan 29, 2017 reply Follow flag its guranted. Could you tell why its not? 0 0 replyShare Surajit commented Jan 29, 2017 reply Follow flag 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 0 replyShare vishwa ratna commented Jan 29, 2017 reply Follow flag I see now... Mutual exclusion is gaurantee. 0 0 replyShare Arnabi commented Jan 29, 2017 reply Follow flag Sushant pls explain how mutual exclusion is guaranteed.. 0 0 replyShare Sushant Gokhale commented Jan 29, 2017 reply Follow flag 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 0 replyShare DroidX commented Apr 8, 2017 reply Follow flag How bounded waiting is satisfied? 2 2 replyShare nikkey123 commented Sep 26, 2017 reply Follow flag plz explain progress in this question 0 0 replyShare nikkey123 commented Sep 26, 2017 reply Follow flag plz explain progress on this question 0 0 replyShare Please log in or register to add a comment.
1 1 vote 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 0 reply Please log in or register to add a comment.