Consider a system which has $28$ instances of a resource $P$ such that $4+n$ processes share them,$4$ process request $5$ instances of $'P'.$ If $n$ process request $5$ instances of same resources what is the maximum value of $n$ such that system is in safe state______

Out of this 4 process require 5 resources and n require 5. So For the minimum no of processes for which deadlock occurs we will take away 1 resource from each of the process. So total 4 processes have 4 resources each and n have 4.

So that means 4*4+4*n=28 for deadlock so for deadlock minimum val of n is n=(28-16)/4=3

This causes deadlock. So for system to be deadlock free maximum value of n is = 3-1=2. This is because this value of n will not lead to any deadlock 3 would. So we first calculate the value for minimum value which causes deadlock and then subtract 1 for max value which wont cause deadlock.

A system has $3$ resources and $5$ process competing for them.Each process can request a maximum of $'N'$ instances.The largest value of $N$ that will always avoid deadlock is_______$?$

for deadlock we assign n-1 resources to each process. So as we have 3 resources available and 5 processes so it means 5(n-1)+1=3 for no deadlock so n-1=2/5-> n=1.4 so we can have maximum 1 resource request per process