Design and implementing a software tool to ensure undeadlock state by perfect distribution of resources' instances among competing processes

In computer operating systems books, they explain and solve deadlock problems by declaring in advance the maximum needs of resources and their instances for each process, the total number of resources' instances, and the allocation of the resources' instances for each process. In this paper, we introduce an effective software tool to prove that it is not necessary to declare in advance the allocation of resources' instances for each process since we suggested and implement in the tool some equations to calculate and discover a suitable allocation of resources' instances to be distributed among competing processes in such a way that the computer system will never enter a deadlock state. In fact, the only necessary and sufficient conditions to solve deadlock problems are the total number of resources and their instances besides the maximum needs of resources and their instances for each process. The theory and details are explained with some examples in the contents.