Task scheduling is the main problem in cloud computing that reduces system performance; it is an important way to arrange user needs and perform multiple goals. Cloud computing is the most popular technology nowadays and has many research potential in various areas like resource allocation, task scheduling, security, privacy, etc. To improve system performance, an efficient taskscheduling algorithm is required. Existing taskscheduling algorithms focus on taskresource requirements, CPU memory, execution time, and execution cost. In this paper, a task scheduling algorithm based on a Genetic Algorithm (GA) has been presented for assigning and executing different tasks. The proposed algorithm aims to minimize both the completion time and execution cost of tasks and maximize resource utilization. We evaluate our algorithm’s performance by applying it to two examples with a different number of tasks and processors. The first example contains ten tasks and four processors; the computation costs are generated randomly. The last example has eight processors, and the number of tasks ranges from twenty to seventy; the computation cost of each task on different processors is generated randomly. The achieved results show that the proposed approach significantly succeeded in finding the optimal solutions for the three objectives; completion time, execution cost, and resource utilization.
Recently, cloud computing is the most popular technology; resource allocation, task scheduling, security, and privacy have been widely used in various fields. Scheduling plays an important role in improving the efficiency of all cloudbased services. In cloud computing, task scheduling is used to assign the task to the optimal resource for execution. Task scheduling algorithms have different types of algorithms and different issues as completion time, execution cost, complexity, etc.
Cloud computing has emerged as a new computing platform according to the development of virtualization and Internet technologies [
Cloud computing is interested in resource management, security, performance, reliability, etc., [
In [
The objective of task scheduling in the multiprocessor system is to assign a dependent task to the processors, and the processing time will be reduced. To minimize the processing time, the GA has applied to the processors to obtain various solutions and faster processing time. Task scheduling considers two aspects: the earliest start time (EST) and some task dependencies (NTD). This comparison made by using Java simulation and the result obtained that the proposed algorithm solves minimum EST attains faster processing time than the maximum EST [
The task scheduling algorithms using Efficient State Space Search GA (ESSSGA) use the benefits of heuristicbased algorithms to minimize space search and time to obtain effective solutions [
A new GA for task scheduling in the multiprocessor systems has indicated that task execution priority depends on the height of task graphs to perform scheduling. This method is simulated and used to compare with the basic genetic algorithm [
A new GA is used for solving the problems in scheduling task graphs. The algorithm is entirely dependent on the new approach to reduce the communication cost of processors and the length of critical time. In order to solve the scheduling of the task graph, effective GA has been applied. GA proposed for scheduling the task graph that can be acquired is effective in scheduling with low time. The results obtained from the study stated that the algorithm related to graphs without communication cost could act quickly when compared to other MCP algorithms [
The GA chromosomes like task list (TL), processor list (PL), and integration of both (TLPLC). The experiments on realworld application graphs like Gaussian elimination, Gauss Jordan and Laplace equation, and LU decompositions. TLPLCGA is related to GA and heuristic algorithms regarding the processor’s time and efficiency conducted. The result experienced was that the hybrid approach performs better than the other algorithms [
The effectiveness of Node Duplication GA (NGA) based approach against the existing deterministic scheduling techniques for reducing the interprocessor traffic communication. The results obtained from the simulations indicate that the GA can use the scheduled task to meet deadlines and acquire high processor utilization. Performance analysis of NGA is compared with GA, FCFS, and List Scheduler [
An effective method based on GA is created to solve the problem of multiprocessor scheduling. This paper used GA for scheduling precedence task graphs with intertask communication onto multiprocessors without considering the communication channel. Experimental results show that hard problems have been taken from the internet, illustrates GA with optimization of parameters [
The task scheduling problem has been formulated as a multiobjective optimization problem [
The optimal solution to the task scheduling problem cannot be obtained in a limited time and can be found by performing a comprehensive search. So, it is one of the NPComplete problems [
The rest of this paper is presented as follows: Section 2 discusses problem definition. In Section 3, the operations of the proposed algorithm are illustrated. Our GA approach to finding the optimal task scheduling for a cloud computing system is described in Section 4. Section 5 discusses the results, and in Section 6, conclusions are given.
G  A task graph 
DAG  A Directed Acyclic Graph 
t 
Task k 
Pi  Processor i 
M  Number of tasks 
N  Number of processors 
ni  Node i 
ST (ni, p)  Start time of node i on a processor p 
FT (ni, p)  Finish time of node i on a processor p 
RT (pi)  Ready time of the processor i 
Wij  Computation cost of task i on the processor j 
Cost (Pj)  The cost of processor j per second. 
B 

LT  Tasks’ List based on DAG order. 
DAT (ti, pj)  The Data Arrival Time of task i at processor j 
CP  A critical Path of G 
Pc  Crossover ratio 
Pm  Mutation ratio 
Pop_size  Population size 
GN  Number of Generations 
Maxgn  Maximum generation 
We denote the task scheduling in the cloud computing as a Graph G (M, E) with M nodes (n_{1}, n_{2}, n_{3},
The execution time of a node
The computation cost of node i on the processor j (W
Let C(n
In this paper, the processors in cloud computing are heterogeneous. Therefore, the task’s computation cost varies according to the processor. The start and finish time of
The Data Arrival Time (DAT) of t
where
The task scheduling problem in cloud computing can be defined as; Find the best assignment of the start times of the given tasks on processors such that the schedule length (the completion time) and execution cost are minimized with the condition that precedenceconstrained is preserved.
The completion time is defined as the schedule length or finish time and is computed by:
where,
The following pseudocode shows how to find the schedule length (denoted by
For all processor P 
For k = 1 to M 
{ 
Remove task t 
j = 1 
While j < = N 
{ 
If t 
ST[t 
FT[t 
RT[p 
End If 
} 
} 
S_Length = max{FT[ 
The total cost (
The utilization of resources is given by dividing the total value of
That is, the objective is to minimize
The following subsections investigate the different components of the proposed GA, encoding, initialization, objective function, crossover, and mutation operations. The GA is terminated when the best solution found, or the number of generations exceeds the Maxgn.
In the proposed GA, if we have M tasks and N processors, the chromosome is divided into two parts; distributing and scheduling parts. The distributing part represents the processor’s indices, and the scheduling part shows the tasks to be processed, as shown in
The initial population is generated randomly and according to the following steps:
A chromosome X is generated, as shown in
The first part of X is generated randomly from 1 to N.
The second part is generated randomly from 1 to M taking into account the precedenceconstrained.
Repeat from 1 to 3 to generate the number of chromosomes (population size).
This paper’s main objective is to map all the tasks to all the processors, minimize the completion time, execution cost, and maximize resource utilization. Therefore, the fitness function (
In the crossover, we use a 1point crossover to produce one child from two selected parents based on the Pc value. The distributing part of the child is taken from the distributing part of the first parent, and the scheduling part of it is taken from the second parent.
The mutation operation is performed on the distributing part of the selected parent based on the Pm value. The position to be mutated is selected randomly to change its value as shown in
The following algorithm explains how to use the different components of the proposed GA as described in Section 3 to solve the task scheduling problem.
In this section, the proposed GA has been applied to two examples. The values of pop_size, P
In this example, the number of M is 10 tasks, and N is 4 processors. The communication cost between the tasks and the computation cost of each task on different processors are generated randomly from 1 to 20, and 1 to 5, respectively. The communication cost and the computation cost are shown in
t_{1}  t_{2}  t_{3}  t_{4}  t_{5}  t_{6}  t_{7}  t_{8}  t_{9}  t_{10}  

t_{1}  0  0  0  0  0  0  0  0  0  0 
t_{2}  18  0  0  0  0  0  0  0  0  0 
t_{3}  3  0  0  0  0  0  0  0  0  0 
t_{4}  0  16  14  0  0  0  0  0  0  0 
t_{5}  0  0  12  0  0  0  0  0  0  0 
t_{6}  0  0  0  8  0  0  0  0  0  0 
t_{7}  0  0  0  0  1  0  0  0  0  0 
t_{8}  0  0  0  0  0  12  10  0  0  0 
t_{9}  0  0  0  0  0  0  9  0  0  0 
t_{10}  0  0  0  0  0  0  0  7  16  0 
P_{1}  P_{2}  P_{3}  P_{4}  

t_{1}  4  4  4  3 
t_{2}  3  5  5  4 
t_{3}  4  2  5  5 
t_{4}  2  1  4  4 
t_{5}  5  3  5  4 
t_{6}  5  1  3  1 
t_{7}  1  2  5  4 
t_{8}  1  1  4  3 
t_{9}  4  1  3  5 
t_{10}  3  2  4  4 
The cost of different processors per second is generated randomly from 1 to 10 and is shown in
P_{1}  P_{2}  P_{3}  P_{4} 
1  7  2  2 
The best solution obtained by the proposed genetic algorithm is shown in
The task scheduling on the different processors is shown in
Task  Start  Finish  Processor  Computational cost 

t_{1}  0  3  4  3 
t_{2}  6  10  1  4 
t_{3}  10  15  1  5 
t_{4}  16  21  3  5 
t_{5}  3  7  4  4 
t_{6}  23  25  1  2 
t_{7}  33  34  4  1 
t_{8}  30  31  2  1 
t_{9}  34  37  4  3 
t_{10}  44  46  2  2 
The busy time of the processors is shown in
4  15  5  2 
The available time of the processors is shown in
P_{1}  P_{2}  P_{3}  P_{4} 

44  41  31  42 
The completion time, execution cost, utilization, speedup, and efficiency are shown in the following table,
Completion time  Execution Cost  Utilization  Speedup  Efficiency 

46  64  0.85  0.14  0.035 
In this example, consider four cases with N = 8 processors. The number of tasks is: 20, 30, 40, 50, and 70 tasks in the first, second, third, and fourth case (M = 20, 30, 40, 50, and 50). The communication cost between the tasks and the computation cost of each task on different processors are generated randomly from 1 to 20, and 1 to 5, respectively.
The completion time, execution cost, utilization, speedup, and efficiency are shown in the following table,
No. of tasks  Completion time  Execution cost  Utilization  Speedup  Efficiency  No. Processors 

35  370  80.36  0.196  0.025  8  
34  671  66.12  0.338  0.042  
36  702  64.24  0.358  0.045  
55  1008  63.64  0.364  0.045  
64  1371  61.72  0.383  0.048 
The proposed GA has successfully solved task scheduling problem in Cloud computing in this paper. The proposed algorithm targets to minimize completion time, execution cost and maximize resource utilization. The completeness and correctness of the proposed algorithm have been tested. This has proven that our proposed technique enabled us to obtain results faster, leading to saving time and effort. In other words, the use of the proposed genetic algorithm has played a major role in reducing the search space generated by the problem.
In summary, our experimental results indicate that the algorithm is more efficient than other heuristics. To the best of our knowledge, our method’s structure and design are designed for the task scheduling problem in the cloud computing environment. This has made it very hard to find common features with other previous methods for comparison reasons.
The authors thank the anonymous referees for their careful readings and provisions of helpful suggestions to improve the presentation.