The document presents an advanced algorithm for efficient resource allocation and load balancing in cloud computing environments, aimed at minimizing deadlocks while process requests are executed on virtual machines (VMs). It discusses various existing algorithms, such as token routing, round robin, and randomized approaches, and analyzes their drawbacks, proposing a new method that ensures optimal allocation of resources based on priority and memory requirements. The experimental results indicate that the proposed method significantly improves performance and reduces waiting time, making it superior to traditional scheduling methods.