Recently, resource management is the major issues in cloud computing (CC) environment because of dynamic heterogeneity of cloud computing environment. The task scheduling and virtual machines (VMs) allocation play a vital role in resources management of CC. Most of existing works for these issues aim to achieve single objective as maximizing resource utilization, load balancing, or power management. Currently, the big challenge in CC is building task scheduling and virtual machines (VMs) allocation algorithms that consider all these objectives in the same time. This problem is called task scheduling with VMs allocation multi-objectives problem which is NP completeness problem. In this paper, a new task scheduling algorithm is proposed for achieving efficient resource management based on these objectives. This proposed algorithm uses a modified genetic algorithm (GA) to find the optimal solution for choosing the most appropriate VMs for executing received tasks and their appropriate servers that will deploy these VMs. This proposed algorithm uses a matrix structure for representing the chromosome of GAS which combines the ids of tasks, VMs, and servers. Simulation results show that the proposed algorithm achieves better performance than ETVMC, TSACS, and ACO algorithms in terms of makespan, scheduling length, throughput, resource utilization, energy consumption, and imbalance degree.