Resource allocation and the associated deadlock prevention problem originated in the design and the implementation of the operating systems, comprising distributed computing, parallel computing and grid computing. This paper presents an improving deadlock prevention algorithm used to schedule the policies of resource supply for resource allocation on heterogeneous distributed platform. In the current scenario, deadlock prevention algorithm using two way search method has created the problem of taking higher time complexity of O (root m) arc traversal as the edge (v,w) is added to the graph. This paper proposes the algorithms for allocating multiple resources to competing services running in virtual machines on a heterogeneous distributed platform. We have implemented and performed our algorithm proposed by using CloudSim simulator. The experiments results show that our algorithm can quickly prevent deadlock and then resolve the situation of approximately orders of magnitude in practical cases.