Reply To: Study Group — Full dedication requested…..

All About Education Forums Computer Science and Information Technology Study Group — Full dedication requested….. Reply To: Study Group — Full dedication requested…..

  1. You can use the formulae told by Ajay or you can think as follows:
    3 user processes reqiuring 2 units of resource each. Meaning 3*2=6 resources will always suffice. But is it the minimum?? Lets try with 5..
    If we have R=5, then 2 of the 3 process can hold their total requiremnt of 2 units, and 1 unit will be still remaining, which can be acquired by the 3rd process, now 3rd process will wait for another unit to get free. But since the other two processes have already got their 2 units, they can complete and release their resources, as soon as they complete, 4 resources will be freed and 3rd process can take any 1 of the 4 newly freed resources, and this way 3rd can also complete. So R=5 is alaso, but again, is it the minimum??
    Letstry with 4… If each of the 3 process are holding 1 resource, their will be 1 recource left which any of the 3 can acquire and complete its execution and release its 2 units of resources, then the other two also complete… So 4 is the minimum R till now.
    Lets try with R=3, IF each process is holding 1 resource then all the 3 units will be helded by some process and their will be no more units left, now each process will wait for 1 more resource to complete, which they will never get because of the hold and wait condition.. Thus 3 units of resource wont suffice here.
    Thus 4 is the right answer.
    Lol, If u r unable to understand this logic u can use the formulae as well.. i knew m bad at explaining things 😀