Docsity

A Task Scheduling Algorithm Based on Load Balancing in Cloud Computing, Essays (university) of Operating Systems

Toggle sidebar
bg1
F.L. Wang et al. (Eds.): WISM 2010, LNCS 6 318, pp. 271–277, 2010.
© Springer-Verlag Berlin Heidelberg 2010
A Task Scheduling Algorithm Based on Load Balancing
in Cloud Computing
Yiqiu Fang1, Fei Wang1, and Junwei Ge2
1 College of Computer Science and Technology, Chongqing University of Posts and
Telecommunications, 400065 Chongqing, China
2 College of Software, Chongqing University of Posts and Telecommunications,
400065, Chongqing, China
Abstract. Efficient task scheduling mechanism can meet users' requirements,
and improve the resource utilization, thereby enhancing the overall performance
of the cloud computing environment. But the task scheduling in grid computing
is often about the static task requirements, and the resources utilization rate is
also low. According to the new features of cloud computing, such as flexibility,
virtualization and etc, this paper discusses a two levels task scheduling
mechanism based on load balancing in cloud computing. This task scheduling
mechanism can not only meet user's requirements, but also get high resource
utilization, which was proved by the simulation results in the CloudSim toolkit.
Keywords: cloud computing; task scheduling; virtualization; load balancing.
1 Introduction
As the key and frontier field of the current domestic and international computer
technology, cloud computing is a computing paradigm that can provide dynamic and
scalable virtual resources through the Internet service to users on demand, and also it
is further development of distributed computing, parallel computing and grid
computing [1]. Its main advantage is that it can quickly reduce the hardware costs and
increase computational power and storage capacity; users can access high quality of
service by low cost. And it is unnecessary to purchase expensive hardware equipment,
as well as upgrade and maintain frequently.
Task scheduling is an important part of cloud computing, which is a mechanism
that maps users’ tasks to appropriate resources to execute, its efficiency will directly
affect the performance of the whole cloud computing environment. Compared with
grid computing, there are many unique properties and the mainly include
virtualization and flexibility for cloud computing [2]. By using virtualization
technology, all physical resources are virtualized and are transparent to user. All user
has their own virtual machine and don’t affect each other, which is created according
to the user’s requirement. Furthermore, one or multiple virtual machines can be run
on a single host, and the utilization of resources is improved effectively, and the
running independency of users’ application is ensured as well as the information
security of system and service availability is improved. Flexibility is the resource
pf3
pf4
pf5

Partial preview of the text

Download A Task Scheduling Algorithm Based on Load Balancing in Cloud Computing and more Essays (university) Operating Systems in PDF only on Docsity!

F.L. Wang et al. (Eds.): WISM 2010, LNCS 6318, pp. 271–277, 2010. © Springer-Verlag Berlin Heidelberg 2010

A Task Scheduling Algorithm Based on Load Balancing

in Cloud Computing

Yiqiu Fang^1 , Fei Wang 1 , and Junwei Ge^2

(^1) College of Computer Science and Technology, Chongqing University of Posts and Telecommunications, 400065 Chongqing, China (^2) College of Software, Chongqing University of Posts and Telecommunications, 400065, Chongqing, China [email protected], [email protected], [email protected]

Abstract. Efficient task scheduling mechanism can meet users' requirements, and improve the resource utilization, thereby enhancing the overall performance of the cloud computing environment. But the task scheduling in grid computing is often about the static task requirements, and the resources utilization rate is also low. According to the new features of cloud computing, such as flexibility, virtualization and etc, this paper discusses a two levels task scheduling mechanism based on load balancing in cloud computing. This task scheduling mechanism can not only meet user's requirements, but also get high resource utilization, which was proved by the simulation results in the CloudSim toolkit.

Keywords: cloud computing; task scheduling; virtualization; load balancing.

1 Introduction

As the key and frontier field of the current domestic and international computer technology, cloud computing is a computing paradigm that can provide dynamic and scalable virtual resources through the Internet service to users on demand, and also it is further development of distributed computing, parallel computing and grid computing [1]. Its main advantage is that it can quickly reduce the hardware costs and increase computational power and storage capacity; users can access high quality of service by low cost. And it is unnecessary to purchase expensive hardware equipment, as well as upgrade and maintain frequently. Task scheduling is an important part of cloud computing, which is a mechanism that maps users’ tasks to appropriate resources to execute, its efficiency will directly affect the performance of the whole cloud computing environment. Compared with grid computing, there are many unique properties and the mainly include virtualization and flexibility for cloud computing [2]. By using virtualization technology, all physical resources are virtualized and are transparent to user. All user has their own virtual machine and don’t affect each other, which is created according to the user’s requirement. Furthermore, one or multiple virtual machines can be run on a single host, and the utilization of resources is improved effectively, and the running independency of users’ application is ensured as well as the information security of system and service availability is improved. Flexibility is the resource

272 Y. Fang, F. Wang, and J. Ge

provided by cloud computing environment which can be increased or reduced dynamically according to users’ demand for tasks. Owing to these new features, the task scheduling mechanism for grid computing can not work effectively in the cloud computing environment. In this paper, a task scheduling mechanism based on the two levels of load balance is discussed, which consider the flexibility and virtualization in cloud computing to meet the dynamic task requirements of users and improve the utilization of resources.

2 Scheduling Model

Cloud Computing Architecture includes three layers, application layer, platform layer and infrastructure layer [3].The application layer is oriented to users, it implements the interaction mechanism between user and service provider with the support of platform layer. Users can submit tasks and receive the results through the application layer in the task scheduling process. The infrastructure layer is a set of virtual hardware resources and related management function, in which the implementation of internal process automation and optimization of resource management can provide optimal dynamic and flexible external infrastructure services. Furthermore, the platform layer is a set of software resources with versatility and reusability, which can provide an environment for cloud application to develop, run, manage and monitor. According to the above architecture, two levels scheduling model [4] are adopted in this paper as shown in Fig.1.

Fig. 1. Two levels scheduling Model in cloud computing

As shown in Figure 1, the first level scheduling is from the users’ application to the virtual machine, and the second is from the virtual machine to host resources. In this two levels scheduling model, the first scheduler create the task description of a virtual machine, including the task of computing resources, network resources, storage resources, and other configuration information, according to resource demand of tasks. Then the second scheduler find appropriate resources for the virtual machine in the host resources under certain rules, based on each task description of virtual machine. Via the two levels scheduling, the task can obtain the required resources, and it would not lead to the resource allocated to some tasks is less than requirement and increase the implemental time while others are more than their requirements and lead to the waste of resources.

274 Y. Fang, F. Wang, and J. Ge

3 Scheduling Algorithm

The load of virtual machine discussed in this paper is expressed by the predicted executing time of tasks running in the virtual machine, named as VLi [5].And the load

of host is expressed by the average load of the virtual machine that run on it, named

as HLi , it is defined as: 1

n j j i

VL HL n

=^ =

, where the n is the number of virtual machines

that run on the host. From the (^) HLi , the average load value avgl and load balancing evaluating value B of

cloud computing environment can be defined as follows:

1

m i i

HL avgl m

=^ =

2 1

( )

m i Li^ avgl B m

=

−

∑ (2)

In the equations above, the number of hosts is m , the smaller value B the better load balancing and the bigger value B the worse load balancing. In order to meet users’ requirements and increase the utilization of resources, a scheduling algorithm based on load balancing is proposed in this paper. The algorithm is based on the former scheduling model discussed, considering the flexibility and virtualization features of cloud computing, it is divided into two levels scheduling, one is the mapping from task to a virtual machine, another is mapping from the virtual machine to host resources. Generally, for the requirement of the task, users want to get the best response time. Therefore, only task response time and the demand for resources are considered in this paper. At the same time, because tasks are dynamic, they may arrive randomly. If the tasks arrive at same time, they will be sorted ascending according to the resource applied by users. And if they arrive at different time, they will be sorted according to the time sequence arrived. The steps of this algorithm are described as follows:

Step1: According to the host resource model, establish the host resource set H = { h 0 (^) , h 2 (^) ," , hm (^) − 1 }and sort ascending order of their processing power.

Step2: According to the task model, establish the task set T = { t 0 (^) , t 2 (^) , ", tn (^) − 1 }.In this

process, the first level scheduler establish the virtual machine description according to the properties of task ,providing configuration information for allocation of resources and creation of the virtual machine. Step3: According to the virtual machine description of Task ti ∈ T , select a host

resource hj that can meet the required resources and the load is lightest. If the host

exists, create the virtual machine and allocate the required resource for it, then update the available resources hFcap of Host h (^) j , otherwise take the Task ti to the tail of the

task queue and waiting for the next scheduling.

A Task Scheduling Algorithm Based on Load Balancing in Cloud Computing 275

Step4: If the resource requirements of the Task ti increase, find whether the host

whose virtual machine of Task ti run on can meet the additional required resources, if

it exists, allocate the additional required resources for it, reconfigure the virtual machine, and then update the host's available resources. Otherwise, the virtual machine is migrated to the host with lightest load and the additional required resources to execute continuously. Step5: If the resource requirements of the Task (^) ti reduce, release the excess

resources that the virtual machine occupied, and update the available resources hold by the host. Step6: If Task ti has been completed, then destroy the virtual machine of Task ti

and release the occupied resources for the other unfinished tasks. Step7: Calculate the load balancing evaluating value B in current environment, if B is greater than the threshold value B 0 , that indicates the load balancing state is

worse, select a virtual machine with lightest load and migrate it to the host which can meet the resource requirement with the lightest load. Step8: Repeat step3 to 7 until all tasks are completed.

In the above algorithm, the virtual machine is scheduled to the host with lightest load each time. The advantage is to avoid overloading for the host hold more resources. If the current virtual machine is scheduled to a host, as the computational amount increase, leading to the virtual machine’s load is heavy, resulting in load imbalance, then take the dynamic migration operation, keeping load balance in current environment.

4 Simulation Experiment and Result Analysis

In this paper, the CloudSim toolkit is used to simulate the scheduling algorithm discussed above [6]. In order to compared with the performance under different environments, a cloud computing environment and a grid computing environment with one hundred host node is set up to implement scheduling of one hundred to one thousand independent tasks, which demand can be dynamically changed during execution. This simulation mainly validates the advantage of the makespan and the resource utilization between this scheduling mechanism in cloud computing and the scheduling mechanism in paper [7] in grid computing, the expression of resource utilization are defined as follows:

1

0

m (^) j

j (^) j

Rt Rc RUsed (^) m

−

==

In equation (3), the total execution time in host h (^) j is Rti , the actual occupied time

in host hj is Rc (^) j , and the number of host is m .The simulation result are described as

Fig.2 and Fig.3:

A Task Scheduling Algorithm Based on Load Balancing in Cloud Computing 277

5 Conclusions and Future Work

The traditional task scheduling in grid computing is to schedule the task directly to the host resources to execute, and it is not well to meet the dynamic requirements of users. A two-level scheduling mechanism based on load balancing is discussed in this paper. The scheduling mechanism take into account the dynamic requirements of users and the load balancing in cloud environment, therefore, it meets the dynamic requirements of users and increases the resource utilization. Through the CloudSim toolkit, we simulate this scheduling mechanism, proving the well scheduling effect. In the future work, we will consider more users’ requirements, such as bandwidth, cost, etc., to establish a precise description of model for the users’ requirements, to further improve the scheduling mechanism.

Acknowledgment

This work was supported by Chongqing Municipal Education Commission, NO.KJ090519.

References

  1. Rimal, B.P., Choi, E., Lumb, I.: A Taxonomy and Survey of Cloud Computing Systems. In: Fifth International Joint Conference on INC,IMS and IDC, vol. 218, pp. 44–51 (2009)
  2. Foster, I., Zhao, Y., Raicu, I., Lu, S.: Cloud Computing and Grid Computing 360-Degree Compared. In: Grid Computing Enviroments Workshop, pp. 1–10 (2008)
  3. Armbrust, M.: Above the Clouds: A Berkeley View of Cloud Computing. In: EECS Department, University of California, Berkeley (2009)
  4. Sadhasivam Dr., S., Jayarani, R.: Design and Implementation of an efficient Two-level Scheduler for Cloud Computing Environment. In: International Conference on Advances in Recent Technologies in Communication and Computing, vol. 148, pp. 884–886 (2009)
  5. Xiang-hui, P., Er-hu, Z., Xue-yi, W., Guang-feng, L.: Load balancing algorithm of multi- cluster grid. Computer Enineering and Applications 45(35), 107–110 (2009)
  6. The CLOUDS Lab.CloudSim: A Novel Framework for Modeling and Simulation of Cloud Computing Infrastructures and Services [EB/OL], http://www.gridbus.org/cloudsim/
  7. Bing-han, L., Jun, H., Xiang, H., Qi, L.: Grid Load Schedule Algorithm Based on QoS. Computer Engineering 35(24), 96–98 (2009)