Finding out the minimum no.of tape units…..?
Given programs = 3
Required resources (Tape units) for each process = 3 units
If we give 3 tape units for each process (3 x 3 = 9) ,it is sure that no deadlock will occur...right ! because we satisfied each process’s requirement so that they can be executed with out any problem.
If we clearly observe the question there he mentioned that the minimum no.of tape units such that no deadlock will occur….
Therefore give resources for each process as many as they want except one ,means no.of resources i give to P1 is (3 – 1) ‘2’….assign for all the processes in the same way...so that we assigned 6 units till now right….still they are in deadlock..
Now the interesting point comes….just give one more tape unit to any one of them (we know max requirement of each process is 3 units) ...so that any one process will use all the 3 resources and release the resources associated to it...now the resources count is increased in such a way it can even fulfill the need of next process...therefore ...in this way all processes will be executed ,finally deadlock will be vanished..
Therefore The the minimum no.of tape units which the system must have such that deadlocks never arise is “7”.(OPTION : B)
Hope You got it….