Binary PSOGSA for Load Balancing Task Scheduling in Cloud Environment

In cloud environments, load balancing task scheduling is an important issue that directly affects resource utilization. Unquestionably, load balancing scheduling is a serious aspect that must be considered in the cloud research field due to the significant impact on both the back end and front end. Whenever an effective load balance has been achieved in the cloud, then good resource utilization will also be achieved. An effective load balance means distributing the submitted workload over cloud VMs in a balanced way, leading to high resource utilization and high user satisfaction. In this paper, we propose a load balancing algorithm, Binary Load Balancing-Hybrid Particle Swarm Optimization and Gravitational Search Algorithm (Bin-LB-PSOGSA), which is a bio-inspired load balancing scheduling algorithm that efficiently enables the scheduling process to improve load balance level on VMs. The proposed algorithm finds the best Task-to-Virtual machine mapping that is influenced by the length of submitted workload and VM processing speed. Results show that the proposed Bin-LB-PSOGSA achieves better VM load average than the pure Bin-LB-PSO and other benchmark algorithms in terms of load balance level.


INTRODUCTION
In the last few years, cloud computing has emerged as a new computing paradigm that primarily aims to provide reliable, customized, and Quality of Service guaranteed dynamic computing environments for end users. Simply, cloud computing is the technology that provides a shared pool of computing resources in the base of on-demand services. In other words, cloud computing is the delivery of computing services such as hosts, storage, databases, networking, software, and more over the Internet. In fact, there are three basic models of services, namely Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS). First, in the service model IaaS, a cloud provider delivers datacenters, hosts and virtual machines, storage, networks, and operating systems to cloud users on a pay-as-you-go basis. Second, the service model PaaS delivers services that supply an on-demand environment for cloud users such as developing, testing, delivering, and managing software applications. It is mainly used by application and software developers. Third and finally, the service model SaaS delivers software applications over the Internet to cloud users on-demand and typically on a subscription basis. It is essential to cloud providers to tend the management operations in both task-level and resource-level services. The task-level scheduling allocates a task to a virtual machine (which we address in this study), while the resource-level scheduling allocates a virtual machine to a host. The other important issue is to keep cloud resources balanced. Therefore, they also tend to schedule the incoming application requests to virtual machines in order to complete submitted tasks at the expected time in a balanced way. Numerous objectives have been addressed in the literature, such as minimizing makespan, maximizing load balancing, minimizing flowtime, and minimizing monetary cost.
Considering that task scheduling is NP-complete, many heuristics have already entered the scene, and some have emerged. For instance, Greedy heuristic, Genetic heuristic, Swarm Intelligence-based heuristics such as Ant colony inspired algorithms, Bee Colony inspired algorithms, Fishinspired algorithms, the Gravitational Search algorithm, and Particle Swarm algorithms. Swarm Intelligence (SI)-based algorithms are population-based and stochastic search algorithms, as these are evolutionary algorithms. In this work, Swarm Intelligence based algorithms are used due to their amazing results achieved in different problems. The SI concept refers to the collective behavior that emerges from the swarms of social insects. Swarms can solve complex problems that exceed the capabilities of their insects without central supervision. What is important, in SI-based scheduling algorithms, is that social insects collectively solve complex problems that are beyond their individual capabilities in an intelligent and decentralized way. As a result, these collective, intelligent, and decentralized behaviors of insects have become a model for solving the problem of task-level scheduling [1], [2]. Due to the impressive performance of SIbased algorithms, researchers have been attracted to this www.ijacsa.thesai.org strategy over the last years. Therefore, we have been inspired by the hybrid of a gravitational search algorithm and particle swarm optimization to propose a bio-inspired task scheduling algorithm that can solve the problem of load balancing task scheduling.
By definition, cloud environments are continuously changed since cloud resources are usually dynamically reallocated per demand. This behavior must be captured by the proposed load balancing task scheduling algorithm to manage the process of allocating virtual machines to tasks. The tasklevel load balancing can explicitly improve makespan, throughput, and scheduling time. On the other hand, resourcelevel load balancing has also succeeded in increasing the performance in terms of response time, VM migration number and time, and resource utilization [3]. In this paper, we propose a load balancing task scheduling algorithm that has been inspired by the hybrid of particle swarm optimization and gravitational search algorithm to find a near-optimal Taskto-Virtual machine mapping to achieve best-balanced resource allocation as well as minimize makespan. The proposed algorithm is a dynamic load balancing algorithm that is more suitable for cloud environments due to its dynamic nature. Although the dynamic load balancing algorithm can consider all changes during runtime, it achieves better results than static algorithms [4].
The rest of the paper is organized as follows. Section II discusses related works. Sections III, IV, and V present a brief introduction to the standard GSA, Standard PSO, and Standard PSOGSA algorithms, respectively. Section VI explains the proposed binary load balancing PSOGSA. Section VII discusses the complexity of the proposed algorithm. Section VIII describes the neighborhood topology of the proposed algorithm. The objective function is discussed in Section IX. Section X explains in detail the technical processes of the proposed algorithm. The experimental results are presented in Section XI. Finally, Section XII concludes the work and suggests some directions for future work.

II. RELATED WORK
This literature review presents many works under the umbrella of Load Balancing to resolve problems related to different performance parameters, such as throughput, CPU utilization, overhead, fault tolerance, migration time, number of migrations, response time, and makespan. Some of these parameters involve the efficiency of task-level schedulers, and some involve resource-level schedulers.
ParticleZ in [4] solves the problem of task scheduling in grids through four phases: job submission, queuing, node communication, and job exchanging. In particular, the role of PSO appears in the phases of communication and exchange. In those phases, particles (nodes) search to find the best position (node with minimum load among neighbor positions). Further, to guarantee load balancing all the time, each node (particle) exchanges its loads with its neighbors in a parallel way. In load search space, the lower the load is, the higher the velocity of the particle. On the other hand, to establish a fair load distribution between each neighbor's set, the exchanged loads have to be under a predefined threshold (second lightest load of neighbor's set -lightest load).
Aslanzedh et al. [5] have been inspired by the endocrine system to improve the load balancing technique in cloud management. In fact, they have combined the endocrine system and PSO (Endocrine-PSO), aiming to schedule tasks as well as minimize makespan in load-balanced resources. The Endocrine-PSO algorithm has employed the functions of hormone regulation (load balance side) and PSO (task scheduling side) to perform the scheduling process efficiently. By endocrinology science, there is the push-pull procedure, which describes the hormone regulation process in the human body (push means stimulating a hormone from a gland, while pull means inhabitation the hormone to another gland). Technically, Endocrine-PSO provides two particles: one for the push operation (St), and the other for pull (Dt). The St and Dt carry values of stimulating hormones and inhibiting hormones respectively. Results show that the Endocrine-PSO can find the best mapping, either for choosing the best task-to-VM schedule or migrating the tasks from overloaded underloaded VM.
Different criteria have been evaluated in [6] for the PSObased scheduling algorithm that has developed to increase the efficiency of the load balancing scheduling process in clouds. This algorithm (LBMPSO) aims to minimize makespan, transmission time, and transmission cost, and to maximize reliability and load balancing. LBMPSO guarantees the reliability of clouds by rescheduling tasks that have failed to be scheduled as well as guarantees load balancing between tasks and available VMs.
Jena [7] has proposed a Nested and Multi-objective PSO Framework for task scheduling in a cloud environment. Furthermore, other criteria have been addressed in this paper. The MOPSO (Multi objective PSO) algorithm has been proposed to minimize energy and makespan. The author has hybridized PSO with an evolutionary algorithm to create the proposed multi-objective algorithm. Additionally, another concept has been considered to make solutions of MOPSO valuable spread solutions that are selected based on Pareto dominance.
Dasgupta et al. [8] have modified the load balancing genetic algorithm with a new objective function that guarantees the user's QoS preferences as well as minimizes response time. The authors have contributed the weights of the objective function to satisfy users' preferences. This algorithm outperforms its rivals such as SCH, RR, and FCFS. However, a limitation in this load balancing algorithm has been observed: it considers that all jobs have the same priority, which is not the case of real-world jobs.
Xin Lu and Zilong Gu [9] have proposed an ACO-inspired load-adaptive cloud resource scheduling algorithm to maximize CPU utilization. It has solved two issues, the detection of hotspot node (the overloaded VM) and adaptive resource scheduling. The proposed model would monitor the CPU usage, memory, and bandwidth of all VMs within a cluster, and if a hotspot VM is detected, the scheduling process starts. The resource scheduling process is performed to find the idle node that contributes to lighten the load over the hotspot node. The authors added an expansion factor to the global update to enable faster convergence of the ant to the www.ijacsa.thesai.org path that has the desired resources by expanding its pheromone intensity. Results show that the proposed algorithm easily detects overloaded VMs and finds the nearest idle node.
More related research has addressed the load balancing issue in grid environments. Ludwig et al. [4] have introduced the AntZ approach. They have enhanced the previous works [10] and [11] to adopt the problem of load balancing efficiently. They take advantage of decay rate in [11] and mutation rate in [10] and then combine them into AntZ. Specifically, the mutation rate addresses the problem of load balancing due to its effect on guiding ants to the best path. Dhinesh Babu and Venkata Krishna [12] have proposed a honey bee inspired load balancing algorithm (HBB-LB). The proposed HBB-LB strategy schedules tasks by taking into consideration the VMs' load balance aiming to minimize makespan, response time, and number of migrations. The proposed algorithm divides VMs based on its computing capacity into overloaded VMs, under-loaded VMs, and balanced VMs. The balancing process is performed by removing tasks from the overloaded VMs and submitting them to the under-loaded VMs with respect to task priority. The removed tasks act as honeybees, and the under-loaded VMs represent a profitable nectar source. Results show that the HBB-LB algorithm works robustly without heavy overhead, and also works efficiently in heterogeneous cloud systems.
Lili Xu and Kun Wang in [13] have proposed a green cloud task scheduling algorithm (GCTA) based on an improved binary PSO variant. In the proposed algorithm, they tried to enhance the binary PSO solution by avoiding matrix operations and using pipelined numbers for virtual machines. The authors have compared the performance of the proposed GCTA algorithm with a sequential scheduling algorithm and found that the proposed GCTA strategy achieves better performance.

III. STANDARD GSA
The GSA treats masses as search agents. The Newtonian laws of gravity and motion define how all masses move in the direction of other masses and the speed at which they do so. The greater the mass, the slower the movement and the greater the attraction to the other masses is. Since, in the GSA, a greater mass means a better solution, the GSA is seen as an excellent way to guarantee convergence with the optimum. Every mass has a position; it also has inertial, active gravitational and passive gravitational masses. Theoretical physics defines these properties in the following way [14]: Active gravitational mass: measures how strong an object's gravitational field is. Objects with small active gravitational mass have weaker gravitational fields than objects with greater active gravitational mass.
 Passive gravitational mass: measures how strong is the interaction of an object with the gravitational field. Objects with small passive gravitational mass are subject to a weaker force than objects in the same gravitational field with larger passive gravitational mass.
 Inertial mass: measures the strength of the resistance offered by an object to changes in its motion state as a result of the application of force. Objects with large inertial mass will undergo a slower state change as a result of the application of force than objects with small inertial mass.
If we assume the existence of s masses, then the position vector of the k th mass object at time(t) X k (t) will be as set out in (1): As well as positional property, each mass also possesses velocity and acceleration, and these may be represented using a vector.
The acceleration vector Acc k (t) of mass object k at time t is a vector of n elements as follows: (2) while the velocity vector also has n elements as follows: Additionally, the vector of global best positions at time t is: (4) Equation (5) sets out the force exerted on object i by the object j: In this equation, M j is the value of the mass related to mass object j, M i is the value of the mass related to mass object i, ε is a small constant, and R ij (t) is the straight-line distance in Euclidean space between mass object i and mass object j. Equation (6) gives us the value of G(t) as a function of initial value G0 at iteration t: In this equation, G0 is the initial gravitational constant and α is a user-defined descending constant, t is the current iteration, and t max is the maximum number of possible iterations. F i d (t) is the total force exerted in the d th direction on mass object i and is a sum (randomly weighted) of the d components of other mass objects' forces: In this equation, rand i is a uniform random variable in the interval [0, 1].
The object i accelerates in the d th direction at time t at the rate of Acc i d (t), calculable according to (8): where M ii is the mass object i inertial mass. Equations (9) and (10) calculate, respectively, this object's next velocity and position at time t+1: where rand i is, once again, a uniform random constant in the interval [0, 1]. Its purpose is to give the search a www.ijacsa.thesai.org randomized characteristic. Current velocity and current position are, respectively, expressed as v i d (t) and x i d (t).

IV. STANDARD PSO
The usual use of the population-based algorithm PSO (Particle swarm optimization) is the efficient solution of problems of optimization, and PSO is one of various techniques of swarm intelligence used to solve problems of optimization.
In this class of techniques, "particles" (search agents) fly in the optimization problem's search space. This activity is a representation of the process of searchingit is, in effect, a journey that searches for the best position that can be taken by a particle. Each search agent, or particle, is a candidate for the role of optimal optimization problem solution, and each changes velocity and position to look for an improved position in the search space. These changes of velocity and position follow the rules deduced originally from behavioral models representing the flocking of birds as proposed by Kennedy and Eberhart in [15]. In each case, calculation of next velocity and position (respectively vi,d (t+1) and xi,d (t+1)) is specified (again respectively) by (11) and (12): Once again, rand i is a uniform random constant in the interval [0,1] and is used to randomize the search. The pbest i d represents the current mass object's personal best position on the d th direction, while gbest d represents the ith mass object's global best position on the d th direction at iteration t. Current velocity and position are represented respectively by vi,d (t) and xi,d (t).
In fact, Kennedy and Eberhart have proposed another variant of PSO. In [16], they have proposed the binary version of PSO that is proposed to solve discrete problems. The significant difference in binary PSO is the way in which positions can be updated. Updating of positions is specified by finding the value of the sigmoid function for each mass' velocities as in the following (13): Values that returned from the sigmoid function are normalized, as defined in (14): where rand i is a uniform random constant in the interval [0,1]. Here, the sigmoid function is used to transfer a realvalued velocity vi,d to a probability value in the range of In other words, the strong points of both PSO and GSA were taken into consideration to improve the weakness of GSA exploitation ability as well as PSO exploration. As tested in [17], the Hybrid PSOGSA has very good exploration and exploitation abilities, which are due to its ability to avoid becoming stuck in local optima and tending to converge to the best solution quickly.
The combination of PSO exploitation and GSA exploration is translated into a new velocity equation (1). That Hybrid PSOGSA velocity integrates the velocity of both GSA and PSO to boost the balance between global search capability of GSA and local search capability of PSO. The Hybrid PSOGSA velocity equation considers the acceleration of the mass object rather than pbest as in PSO velocity, which indicates that the Hybrid PSOGSA relies on the global search of PSO with the local search of GSA. The velocity of mass object i on the d th dimension at next iteration (t+1) is vi,d (t+1) and its position x i d (t+1) is calculated according to (15) and (16), respectively: ( ) (16) where randi is a uniform random constant in the interval [0,1]. This random number is used to give a randomized characteristic to the search, acc i d (t) is the acceleration of the current mass object on the d th direction, and gbest d is the global best position of i th mass object on d th direction in iteration t. The vi,d (t) and xi,d (t) are its current velocity and position, respectively.
A good balance between exploration and exploitation can be achieved by controlling terms of the velocity equation based on its factors w, c1, and c2. The functions of these terms and these factors are explained as follows:

1) Momentum component (w × vid(t)):
The inertial factor w characterizes inertia of masses, i.e., it controls the momentum of masses and how much mass remembers its previous velocity. Larger w causes the mass to have a better exploration ability, and smaller w values allow the mass to have a better exploitation ability.
2) Cognitive component (c1 × rand i × acc i d (t) ): The first behavioral factor c1 controls how much mass can be influenced by its acceleration at iteration t.
3) Social component (c2 × rand i × (gbest -x i (t)): The second behavioral factor c2 controls how much a mass can head toward the population's best mass.
In the case of c1 and c2, the larger values cause the mass to have a better exploitation ability. In fact, effective values can permit these three factors to achieve a good balance between exploration and exploitation. www.ijacsa.thesai.org VI. PROPOSED BINARY LOAD BALANCING PSOGSA The Bin-LB-PSOGSA (Binary Load Balancing PSOGSA) works to distribute submitted application requests over VMs in an efficient, balanced distribution. At each time, requests of different users are submitted at different submission times to the cloud system. Then, a search process is performed by Bin-LB-PSOGSA to assign tasks of submitted application requests to VMs in a dynamic way. At the same time, a rescheduling of tasks that have already been submitted is re-applied, i.e., the task is bound to the submitted requests list, and a new search process is performed based on the new submitted requests list.
Unlike continuous search space, the search space is represented as a hypercube. Each mass moves over hypercube nodes (corners) by flipping one or more bits of the mass position matrix. Iteratively, the position matrix of a mass is binary-coded. But, the velocity matrix still consists of continuous values belonging to the real numbers. Each velocity element value holds the probability to flip or change the binary value of the corresponding position element. The process of flipping (or changing binary value) is performed by using a transfer function. In fact, transfer functions are used to determine the probability of the value of each bit in the mass position matrix (0 or 1). [18] In the deep search process of Bin-LB-PSOGSA, each mass in the population represents one candidate solution or, in other words, a task-to-VM mapping. Each candidate solution has a fitness value, which is the value of the expected finish time of each submitted application request.
In pseudo code of the Bin-LB-PSOGSA (see Algorithm 1), first, the masses' population is initialized by the function initialize Masses (tasks, VMs) at line 2. In the initialization phase, tasks are assigned randomly to VMs. Then, for each iteration, global variables are updated that have to be changed iteratively, such as gravitational constant, best mass, and worst mass, by updateGlobalVariables(iteration) at line 4. Until the maximum iteration is reached and for each mass object in the population, the mass value of each mass object and gravitational force exerted by the population masses is calculated at lines 6 and 7, respectively. Then, at lines 8 to 10, mass position, velocity, and fitness are updated. As in Algorithm 2, the pseudo code that has clarified the way to update the velocity of each mass is presented.
After updating the mass's fitness, it is necessary to decide if the new fitness is better than what the mass object already found in its trip; this is done in line 12. If the new fitness is better, the personal best fitness and mass will be updated. Consequently, if the personal best mass is better than all solutions found by all mass objects, the global best mass is updated as in line 16. In fact, the global best mass is the promising best mass object that attracts most of the population due to its mass value (biggest mass value or heaviest mass). Based on the topology of the neighborhood that has been considered in this variant, Gbest topology (discussed in subsection VIII), the population is influenced by the best global mass positions that are updated at line 18. In the next iteration, by updating the best global positions so far, other masses' objects take their new positions. Over time, most of the population comes increasingly closer to the best global mass, and finally, if the maximum iteration number is reached, the search process is terminated. Eventually, the best global mass is returned in the form of the best task-to-VM mapping at line 22.

VIII. NEIGHBORHOOD TOPOLOGY
The neighborhood topology adopted in the proposed Bin-LB-PSOGSA is the global neighborhood topology (Gbest) [19]. In other words, Gbest is a fully connected topology where all the masses are neighbors of each other and able to exchange information with each other. Further, the process of exchanging is fast due to the full connection between all population masses. Gbest topology makes the proposed Bin-LB-PSOGSA a fully informed strategy where every mass in the population learns from the same global best mass and is influenced by its positions. www.ijacsa.thesai.org

IX. OBJECTIVE FUNCTION
The solution of proposed algorithms is to minimize the expected execution time of each task in submitted application requests or ET ij of the task T i that is running on VM j . The calculation of ET ij is as follows: (17) The processing speed PS ij related to T i running on VM j in the cloud depends on how many request tasks have been mapped to that VM (or n) as well as the total allocated MIPS of VM j along all its processing elements or Pes (or Capacity j ). Calculation of the request processing speed PS i is shown in (18): (18) X. BIN-LB-PSOGSA TECHNICAL PROCESSES In this section, the mathematical notations and technical processes' steps are discussed. In the proposed algorithms, binary search space is considered. Therefore, the binary matrix encoding form in [13] is adopted to represent mass objects. Accordingly, each mass object has properties of mass position matrix and mass velocity matrix that will be decoded to a twodimensional matrix. The first dimension represents the VM number and the other tasks number. The position matrix takes binary values, while the velocity matrix keeps the continuous values. Additionally, each corresponds to a task-to-VM mapping as a candidate solution.
Here, the mathematical notation of the problem is described. The task set T { T ,T2, ….. ,Ti, …… , Tc } will be mapped to VMs set VM { VM ,VM2, ….. ,VMj, …… , VMv } using the relationship matrix representation in (18). Let s be the masses' population size, each mass object m represented by position matrix Xm of c × v position elements ( c is the number of tasks and v is the number of VMs where i = { , 2, 3, …. , c} and j { , 2, 3, ….. , v} and m { , 2 , 3 , ….. , s}) as given in follows: ( ) The element x m ij is the position of mass object m in row i and column j; actually, it represents the distribution relationship between task T i and virtual machine VM j, i.e., it explains whether T i is mapped to VM j or not. Position x m ij takes values of either 0 or 1. Namely, it indicates on which VM task T i is working. So, if T i is running on VM j then position x m ij is equal to 1, but it equals 0 otherwise. Finally, positions x m ij that are equal to 1 are recorded composing solution position vector P m (t) at time t as in (19): (19) where p m i,j can take one of x m ij of the relation distribution matrix that has a value equal to 1 and j = (1, 2, … , v).
Here, the technical steps of the proposed algorithms are explained in detail.

A. Population Initialization
Initially, position elements x m ij of each mass m position matrix X m are initiated randomly by mapping each task to random VM, i. e. for each column at index i, one element is arbitrary assigned to the value 1 and the remaining elements (in that column) to 0. Iteratively, this processinitiating mass position matrix --is repeated c×v times for each mass in the population.
For instance, assume that there are seven tasks and three VMs, and the population consists of 50 masses; therefore, the initial position matrix of mass 20 (X 20 ) will be as follows:

( )
Namely, it is shown in the matrix (X 20 ) that T 1 is mapped to VM 2 , T 2 is mapped to VM 3 , T 3 is mapped to VM 2 , T 4 is mapped to VM1 2 , T 5 is mapped to VM 1 , T 6 is mapped to VM 1, and T 7 is mapped to VM 3 .
Finally, the tasks-to-VM vector or dimension vector is defined in which indices of tasks' positions that hold value are stored in it respectively as in (20): (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 9, No. 5, 2018 261 | P a g e www.ijacsa.thesai.org where is the index of assigned task T i in position matrix X k of the mass k, and vector indices are the VMs' IDs.

B. Mass Value, Relevance Force, and Acceleration Calculation
In this step, a mass value, relevance force, and finally the acceleration are calculated based on the gravity law equations in [14]. First, the mass value ( ) of each mass object at iteration t is calculated based on (21) and (22): where ( ) is the fitness value of the mass m at iteration t , ( ) is the global worst fitness in iteration t, and ( ) is the best one at that iteration. Further, ( ) is the current mass value where ( ) is a vector that holds the mass values of neighbor masses' objects at iteration t as shown in (23). This is because ∑ ( ) is the summation of other masses' values. In fact, global best fitness represents the minimum expected finish time that can be achieved by the best global task-to-VM mapping since the global worst is the longest expected finish time.
- (23) Second, the relevance gravitational forces exerted on mass m by another mass b is calculated based on (24): Then, the total result gravitational forces exerted on mass m on the d th direction at time (t) are as in (26): In this equation, rand m is a uniform random variable in the interval [0, 1] generated for each mass m.
Based on Newton's law of gravity and Newton's law of motion, each mass object m moves toward the global best mass object by updating the acceleration vector of that object iteratively. Under the concept of motion law, the acceleration of the mass object m on the d th direction at time t is Acc m,d (t) as in the following equation: where M mm is the mass object m inertial mass.

C. Velocity Updating
The binary version of the velocity equation is as follows: where ( ) is the velocity matrix of mass object m for the next iteration, and ( ) is the current velocity value of the element related to T i and VM j . The acceleration of mass m is ( ). The inertial weight (w) is calculated based on (29) where acceleration coefficients C1 and C2 are based on, respectively, (30) and (31). The rand m is a uniform random constant in the interval [0, 1] generated for each mass object m. Its purpose is to give the search process a randomised characteristic.
For each iteration (t), mass object m records the best global positions in its memory so that all masses can be increasingly closer until a maximum number of iterations is reached. Iteratively, the distance between masses and global best mass is decreased by subtracting the distance between positions x m ij (t) and gbest m ij (t), as stated in equation 28, term (gbest m ij (t)x m ij (t)). Elements Xgbest m and current mass position matrix are subtracted one by one. In the case of the acceleration of masses' objects, a constant random value (c 1 × rand m ) is multiplied with all elements in the acceleration vector, element by element. Also, in the current velocity matrix, the current value of the inertia weight is multiplied with all elements in the velocity matrix. The velocity matrix will be as follows:

( )
To enhance the search process, we have considered a timeadaptive approach for the other controlling parameters such as inertia weight and acceleration coefficients (c 1 and c 2 ) as in (28), (29), and (30). For the inertia weight, we have adopted a time-varying inertia weight as introduced in [20] and acceleration coefficients in [21]. Here, w max and w min have constant values equal to 0.9 and 0.4, respectively, t is the current iteration, and t max is the maximum iteration.

D. Position Updating
Each mass moves to the global best mass by updating positions and becomes increasingly closer to the global best mass over iterations. www.ijacsa.thesai.org Also, for the transfer function in the proposed Bin-LB-PSOGSA, we have used a time-adaptive approach as introduced in [22]. The time-varying transfer function is used here to enhance the exploration and exploitation processes. Moreover, to transform a real-valued velocity V M to a binary value (0 or 1) in the process of updating positions (reencoding) values of relation distribution matrix elements x k i,j [13]. In fact, if the absolute value is large, the probability to flip a bit is higher. Updating of the position matrix elements is performed by applying the time-varying transfer function (TV t ) for each in mass' velocity matrix as stated in (32) and (33).

E. Finding Global best Task-to-VM mapping
By the end of each iteration t, the best task-to-VM maps have been read from the global best mass position matrix. This process happens t times and for only the global best mass found during the searching process.

XI. EVALUATION
In this section, we show how to evaluate the proposed Bin-LB-PSOGSA to test its efficiency in achieving cloud balancing in term of the submitted load. The next subsections discuss the simulation tool and simulation setup we have used in the experiments. Additionally, we explain the algorithm meta-parameters, and finally, we conclude with the results of these experiments. In the last subsection, we assess the performance of the proposed algorithm in terms of load average and processing speed average against the Bin-LB-PSO algorithm.

A. Experimental Tool
The performance analysis of the proposed algorithm is carried out in a cloud simulator. The simulator CloudSim [23] is one of the best simulators for experimental purposes. This simulator is a generalized simulation framework that allows modeling, simulation, and experimenting with cloud computing infrastructure and application services.
In this section, we have analyzed the performance of our algorithm based on the results of simulation done using CloudSim. We have extended the classes of the CloudSim simulator to simulate our algorithm.

B. Simulation Setup
The simulation setup is detailed in Tables I and II. The experiment is carried out with 3 Datacenters each having two hosts, and the characteristics are 1024 MIPS Host processing power, 2 GB RAM, 1000 GB storage, 10240 Mbps (bandwidth), and 2 PEs (or cores). Each PE had the same processing power, as clarified in Table I. In Table II, there are 5 VMs, and the characteristics are 128 MIPS (VM processing power) and 2 PEs (or cores).
In this experiment, the workload has been selected as introduced in [24]. Each task in the workload log, called a cloudlet by Cloudsim, was determined by the parameter PEs, or the number of processing elements (cores) required to perform each task. Each cloudlet required 4 to 256 PEs. The number of PEs is limited to powers of 2 due to the architecture of the supercomputer used in the log.

C. Algorithm Meta-Parameters
The algorithm meta-parameters, or in other words, the controlling parameter settings of Bin-LB-PSOGSA, are as mentioned in equations 28, 29, and 30. The maximum number of iterations is 500, and population size (number of masses) is 50. The acceleration constants C1 and C2 are set to 2 and 2, the inertial weight is linearly decreasing from 0.9 to 0.4. The initial gravitational constant (G ) is , descending constant (α) is 20, and small gravitational constant (ε) is e -1 . The search space bounds are in the range [0, 100], and the velocity range is [-8, 8].

D. Experimental Results
Here, the performance of the proposed algorithm in terms of average VM load and average VM processing speed is discussed. The next subsections explain the performance from different sides in detail. Fig. 1 shows that in comparison with Bin-LB-PSO, the load of the proposed Bin-LB-PSOGSA is smaller than the load of Bin-LB-PSO in general. In particular, both Bin-LB-PSO and the proposed Bin-LB-PSOGSA have stable load values for a long time. This situation is due to the stability of the system because of the number of running application requests. After time passes, both as the time passes, the load increases due to the growth in the number of running application requests. Under the same environmental conditions, the proposed Bin-LB-PSOGSA outperformed Bin-LB-PSO in keeping the system balanced much longer. For instance, at moment 28, the load value of Bin-LB-PSO leaps due to the gap of some successes of application requests www.ijacsa.thesai.org before and after this moment (before it was 2 and after is 61). On the other hand, the load average in the proposed Bin-LB-PSOGSA has lower load average values than Bin-LB-PSO.

1) Average VM load over time
2) Average VM processing speed over time Fig. 2 shows that over time, the average processing speed of application requests of both algorithms decreases in general. In particular, at moment 28, processing speed decreased dramatically due to the obvious increase in the running requests, which indicates the efficiency of both algorithms to utilize VMs. Therefore, it is clear that both Bin-LB-PSO and the proposed Bin-LB-PSOGSA have utilized VMs efficiently over time.
Both Fig. 1 and 2 shows that as the load increases over time, the processing speed of the submitted applications decreases, which proves that the proposed Bin-LB-PSOGSA is more efficient in keeping the load balanced over time as shown in Table III.

XII. CONCLUSION
In this paper, we have proposed a load balancing task scheduling algorithm for cloud computing environments based on the binary hybrid gravitational search and particle swarm optimization strategy. It balances the load of application requests submitted from cloud users over virtual machines in the cloud. The proposed algorithm enhances the overall VM utilization of the cloud system. We have compared our proposed hybrid algorithm with the pure Bin-LB-PSO. Results show that as the load increases over time, the processing speed of submitted applications decreases, which proves that the proposed Bin-LB-PSOGSA is more efficient in keeping the load balanced over time.
In the future, we plan to extend this kind of load balancing for workloads with dependent tasks. Also, we plan to improve this algorithm by considering other QoS factors, as well.