Each process needs 3 tape drives to run to completion.
P1 P2 P3
2 2 2 This is a deadlock state.as each of the process is waiting for one resource at the same time, the system has reached max of its available resources and there are no resources available which can be taken by any process and can run to completion,.
Any number of process which is <3 ,is deadlock free scenario.
If there are 0,1,2 processes then there would be no deadlock.As in the maximum scenario of 2 processes running ,both utilizing 4 resources we still have 2 more resources left which can be taken by either of P1 or p2,and can run to completion,.
Ans is 2.