Suppose I have a system with N processes. Each process needs max K resources (K << N). To prevent collisions a process needs to lock each resource before accessing it. Is a deadlock possible and if yes, what is the maximum N for which the system is still deadlock free?