Algorithm in Cloud Computing Environment, Global Journal on Technology [Online]. ... support test, development, and staging activities [3]. ... on the system information used by the scheduling approaches, there are two categories of .... The number of tickets are been allocated to each virtual machine based on processing.
Global Journal on Technology Issue 8 (2015) 291-301 Sel ected Paper of 2nd Global Conference on Computer Sci ence, Softwa re, Networks And Engi neeri ng , (COMENG-2014) 06 - 08 November 2014, Efes Sürmel i Hotel & Conventi on Center – İzmi r, Kuşa da s ı, Turkey
An Improved Approach for Scheduling Tasks Based on Lottery Algorithm in Cloud Computing Environment Elahe Doostsadigh*, Faculty of Information Technology, Science and Research Kermanshah Branch, Islamic Azad University, Kermanshah, Iran. Reza Asemi, Faculty of Computer Engineering, Science and Research Kermanshah Branch, Islamic Azad University, Kermanshah, Iran. Hadis Barari, Faculty of Computer Engineering, Science and Research Kermanshah Branch, Islamic Azad University, Kermanshah, Iran. Suggested Citation: Doostsadigh, E., Asemi, R. & Barari, H., (2015). An Improved Approach for Scheduling Tasks Based on Lottery Algorithm in Cloud Computing Environment, Global Journal on Technology [Online]. 08, pp 291-301. Available from: http://awer-center.org/gjt/ Received June 16, 2014; revised July 19, 2014; accepted September 07, 2014 . Selection and peer review under responsibility of Assoc. Prof. Dr. Özcan Asilkan. ©2015 SPROC - Academic World Education & Res earch Center. All rights reserved. Abstract Cloud computing paradigm of distributed computing, applications are composed a large number of resources and services for the purpose of sharing resources and services on the internet. Task scheduling problems have paramount importance and are trying to determine an efficient scheduling to run tasks and optimal resource allocation. There are many different ways to schedule the tasks in cloud environment which one of the efficiency measures method is makespan. Makespan is the completion time of all tasks and the purpose is its reduction. This paper introduces a new method for task scheduling based on lottery in order to find a solution for mapping a set of requests to system's available resources which are classi fied with K-means algorithm according to condition of cloud systems and its implementation. Algorithm runs on requests and classified resources in parallel. Using the characteristic of min-min method tried to accelerate the process of finding the answer. The proposed algorithm was evaluated with a view to reducing make span time and compared with min -min, maxmin and suffrage algorithm. Keywords: task scheduling, cloud computing, lottery algorithm, makespan.
* ADDRESS FOR CORRESPONDENCE: Elahe Doostsadigh, Fa culty of Information Technology, Sci ence a nd Resea rch Kerma ns ha h
Bra nch, Is l a mi c Aza d Uni vers i ty, Kerma ns ha h, Ira n. E-mail address: el _doos ts a di gh@ya hoo.com
Doostsadigh, E., Asemi, R. & Barari, H., (2015). An Improved Approach for Scheduling Tasks Based on Lottery Algorithm in Cloud Computing Environment, Global Journal on Technology [Online]. 08, pp 291 -301. Available from: http://awer-center.org/gjt/
1. Introduction Cloud computing is a new computing model using applications, data and IT services are provided over the Internet [1]. Virtualization, distribution and dynamic extendibility are the basic characteristics of cloud computing [2]. IT Organizations over the years found that virtualization allows them to quickly and easily create copies of existing environments - sometimes involving multiple virtual machines- to support test, development, and staging activities [3]. Cloud computing delivers three kinds of services: Infrastructure as a service ( IaaS), Platform as a Service (PaaS) and Software as a Service (SaaS) [4]. These services are available to users in a Pay-perUse-On-Demand model, which can access shared IT resources like server, data storage, application, network and so on through the internet [5]. Different kinds of researches are going on, the research areas includes cloud systems development and management, resource allocation and scheduling, and so on [6]. Task scheduling problems has paramount importance which relate to efficiency of the whole cloud computing facilities [7]. The key issue of scheduling such as discovery applications and resource allocation is the ability to accurately predict the execution times of an application in Cloud Computing environments [8]. Based on the system information used by the scheduling approaches, there are two categories of scheduling algorithm, static scheduling algorithms and dynamic scheduling algorithms. Both have their own advantages and limitations. Dynamic scheduling algorithm has higher performance in comparison to static algorithm, but it has more overhead [9]. Some performance metrics like high throughput, low response time, minimum makespan and flowtime are the conventional me trics used for task scheduling [10]. In this paper, an algorithm based on the lottery for scheduling tasks in the cloud environment has been presented. The main aim is to obtain minimum makespan. To achieve a better balanced load across all nodes in the cloud environment, the policy min-min algorithm has been used. The simulation platform CloudSim is expanded to realize the proposed scheme and the simulation results show that proposed scheduling algorithm can get minimum makespan for tasks in comparison to min-min, max-min and Sufferage algorithms. 2. Descriptions of algorithms In this paper the proposed algorithm has compared with Min-min algorithm, Max-min Algorithm and Sufferage Algorithm. Algorithms are described the following. 2.1. Min–min Algorithm This algorithm chooses small tasks to be executed firstly, which the turn of large task delays long time [9]. It uses minimum completion time (MCT) as a metric, meaning that the task which can be completed the earliest is given priority. This heuristic begins with the set U of all unmapped tasks. Then the set of minimum completion times, M = {min (completion_ time (Ti, M j) for (1 £ i £ n, 1 £ j £ m)}, is found. M consists of one entry for each unmapped task. Next, the task with the overall minimum completion time from M is selected and assigned to the corresponding machine and the workload of the selected machine will be updated. Finally the newly mapped task is removed from U and the process repeats until all tasks are mapped (i.e. U is empty) [11, 12]. 2.2. Max–min Algorithm This algorithm chooses large tasks to be executed firstly, which in turn small task delays long time [9]. It is very similar to min-min and its metric is MCT too. It begins with the set U of all unmapped tasks. Then, the set of minimum completion times, M = {min (completion _ time (Ti, M j)), for (1 £ i £ n, 292
Doostsadigh, E., Asemi, R. & Barari, H., (2015). An Improved Approach for Scheduling Tasks Based on Lottery Algorithm in Cloud Computing Environment, Global Journal on Technology [Online]. 08, pp 291 -301. Available from: http://awer-center.org/gjt/
1 £ j £ m)}, is found. Next, the task with the overall maximum completion time from m is selected and assigned to the corresponding machine and the workload of the selected machine will be updated. And finally the newly mapped task is removed from U and the process repeats until all tasks are mapped [11, 12]. 2.3. Sufferage Algorithm In this algorithm, the minimum and second minimum completion time are found for each task at the first step. The difference between these two values is defined as the sufferage value. In the second step, the task with the maximum sufferage value is assigned to the corresponding machine with minimum completion time. The sufferage heuristic is based on the idea that better mappings can be generated by assigning a machine to a task that would “suffer” most in terms of expected completion time if that particular machine is not assigned to it [13]. 3. Proposed Algorithm The proposed algorithm consists of two phases. At the first step based on the K -Means algorithm e tasks and resources are grouped according to their length and their processing power respectively. The second phase of proposed algorithm is based on lottery algorithms, each task is decided to be placed on a virtual machine. At this stage, each group is scheduled based on lottery algorithm. Hence for each resource free number of tickets are allocated based on their processing power. Then every task tries to choose a resource for its processing with lottery operation. The resource with more processing power has a greater chance to be selected. One of the challenges of using KMeans classification algorithms for the classification of resources and tasks is the determination the K value. For this purpose, the coefficient of variation of processing power is use d. Coefficient of variation is the index to compare the dispersion of two or more characters, coefficient of variation has been shown with C.V. The calculation of C.V. is shown in equation number 1. (1) in the above equation refers to the standard deviation and μ refers to the mean of the data. After obtaining the coefficient of variation, The K value is obtained by equation number 2. (2) In the equation (2), K-Means algorithm then Lottery algorithms run parallel on each group. The second phase of the implementation of the proposed algorithm is based on the lottery algorithm as follows. •
The number of tickets are been allocated to each virtual machine based on processing power, each ticket has a unique number. One Virtual machine that has much more free processors is allocated more ticket to it.
•
The lottery runs once on each Task. The number of tickets of each task could be won as the same number for the tickets of virtual machines in the same group. At the lottery step each task wins a ticket's number and in an array, task is allocated to a virtual machine which wins tickets belongs to it.
The complete flowchart of the proposed algorithm is shown in Figure (1). As it could be seen, the phases of the propose algorithm are carefully run on the basis of consecutive. The general policy of the proposed algorithm is that one task gets logged in the system is assigned to a virtual machine that 293
Doostsadigh, E., Asemi, R. & Barari, H., (2015). An Improved Approach for Scheduling Tasks Based on Lottery Algorithm in Cloud Computing Environment, Global Journal on Technology [Online]. 08, pp 291 -301. Available from: http://awer-center.org/gjt/
has less processing amount. In order to justice to be respected each virtual machine's workload to its processing power is allocated. For example, if a processing power of a virtual machine is 100 MIPS and it's workload is 1000 MIPS, this virtual machine has less processing's workload in comparison to virtual machine with 800 MIPS of processing power and 800 MIPS of processing's workload. This policy makes a fair for the amount of work that needs to be divi ded and it has a considerable impact on reducing makespan.
Start Determine the value of k using the coefficient of variation of resource's processing power.
Grouping of resources and tasks using K-means algorithm.
Continue the process runs in parallel on all -cause groups.
I=k
If(I>0)
A Task which will participate in a lottery can won one of resource's tickets in its teammates. One task will be allocated to one resource which has won it's ticket.
I=I-1 End
Figure 1. Flowchart of proposed algorithm
294
Doostsadigh, E., Asemi, R. & Barari, H., (2015). An Improved Approach for Scheduling Tasks Based on Lottery Algorithm in Cloud Computing Environment, Global Journal on Technology [Online]. 08, pp 291 -301. Available from: http://awer-center.org/gjt/
4. Implementation In order to evaluate the proposed algorithm with the goals of the project and simulation, proposed algorithm, Min-Min, Max-Min algorithm, and Sufferage algorithm is simulated. The Cloudsim is used for the implementation the algorithms which is known as a toolkit for the simulation the cloud environment in Java language. For running programs NetBeans 6.5 is used. To simulate the conside red Algorithms four different scenarios are fully described in the following tables. Table 1 shows the scenario (A)'s characteristics [14], Table 2 shows the scenario (B)'s characteristics [15] and (K. Dutta, 2012), Table 3 shows the scenario (C)'s characteristics [17] and Table 4 shows the scenario (D)'s characteristic [18]. Ta bl e 1. Genera l Cha ra cteri s ti cs for the s i mul a ti on s cena ri o (A) Num. Num. i nstructions Num. Running Time (MIPS) Proc (Sec) Cl oudl et's properti es 27-115
762-4447
Proces sing capabi l i ti es of Da ta Center (MIPS) Vi rtua l ma chi nes ' properti es
16
1000 Proces s i ng power (MIPS) 30-50
Num. VM 4
Amount of memory(RAM) of 512 VMs (MB) Ba ndwi dth of VM (Mbi t/Sec) 1000 Amount of memory(RAM) of 2048 Hos ts (MB) Ba ndwidth of Hos ts (Mbi t/Sec) 10000 Notes . Num= Number, MIPS = Mi l l i on Ins tructi ons Per Seconds , Proc = Proces s or, VM = Vi rtua l Ma chi ne.
Table 2. General Characteristics for the simulation scenario (B)
Cl oudlet's properties
Num. Running Time (Sec)
Num. i nstructions (MIPS)
Num. Proc
2-24
49-763
32
Proces sing capabilities of Da ta Center (MIPS) Vi rtua l Machines' properties
1000 Proces s i ng power (MIPS)
Num. VM
50-120 Amount of memory(RAM) of VMs (MB) Ba ndwidth of vi rtual machines (Mbi t/Sec) Amount of memory(RAM) of Hos ts (MB) Ba ndwidth of Hosts (Mbi t/Sec)
11 1024 1000 12288 100000
Notes. Num= Number, , MIPS = Million Instructions Per Seconds, Proc = Processor, VM = Virtual Machine.
295
Doostsadigh, E., Asemi, R. & Barari, H., (2015). An Improved Approach for Scheduling Tasks Based on Lottery Algorithm in Cloud Computing Environment, Global Journal on Technology [Online]. 08, pp 291 -301. Available from: http://awer-center.org/gjt/
Table 3. General Characteristics for the simulation scenario (C) Num. Num. Running Num. instructions Time Proc Cloudlet's properties (MIPS) (Sec) 9-144
233-7731
Processing capabilities of Data Center (MIPS) Virtual Machines' properties
80
100000 Processing power (MIPS)
Num. VM
30-70
8
Amount of memory(RAM) of VMs (MB) Bandwidth of virtual machines (Mbit/Sec) Amount of memory(RAM) of Hosts (MB) Bandwidth of Hosts (Mbit/Sec)
2048 10000 20480 1000000
Notes. Num= Number, MIPS = Million Instructions Per Seconds, Proc = Processor, VM = Virtual
Machine. Table 4. General Characteristics for the simulation scenario (D) Running Time Num. instructions Cloudlet's properties
Processing capabilities of Data Center (MIPS) Virtual Machines' properties
Amount of memory(RAM) of VMs (MB) Bandwidth of virtual machines (Mbit/Sec) Amount of memory(RAM) of Hosts (MB) Bandwidth of Hosts (Mbit/Sec)
Num.
(Sec)
(MIPS)
Tasks
9-329
233-33179
250
10000 Processing power (MIPS)
Number of VM
30-65
5 3072 10000 20480 1000000
Notes. Num= Number, , MIPS = Million Instructions Per Seconds, Proc = Processor, VM = Virtual Machine.
296
Doostsadigh, E., Asemi, R. & Barari, H., (2015). An Improved Approach for Scheduling Tasks Based on Lottery Algorithm in Cloud Computing Environment, Global Journal on Technology [Online]. 08, pp 291 -301. Available from: http://awer-center.org/gjt/
5. Simulation results As mentioned in previous sections four scenarios are used for simulation. Proposed algorithm with Max-Min, Min-Min, Surfage algorithm in terms of makepan and average of response time have studied. In this section, simulation results are presented. Table 5. Make span time of Algorithms in four scenarios. Max-Min Min-Min Surfage Proposed Algorithm scenario A scenario B scenario C scenario D
245.32 191.53 793.57 15420.52
212.13 79.98 629.71 14439.05
227.7 247.53 1334.06 16714.28
210.64 33.79 593.3 2665.56
Table 5 shows the makespan time in milliseconds for the Max-Min, Min-Min, Surfage and proposed algorithm in four scenarios. The diagram, in figure (2) and figure (3) show makespan time for the proposed algorithm and other algorithms in terms of milliseconds in scenario A, B, C and D. In figure (2) and figure (3) the horizontal axis represents the names of the algorithms and the vertical axis represents the makespan time in milliseconds. As can be seen the proposed algorithm has better results in each of the four scenarios A, B, C and D.
Figure 2. Makespan time in scenarios A, B, C.
297
Doostsadigh, E., Asemi, R. & Barari, H., (2015). An Improved Approach for Scheduling Tasks Based on Lottery Algorithm in Cloud Computing Environment, Global Journal on Technology [Online]. 08, pp 291 -301. Available from: http://awer-center.org/gjt/
Figure 3. Makespan time in scenarios D.
Table 6 shows the percent of improvement of the proposed algorithm in terms of makespan covered in this study, and is obtained according to equation 3. (3) At equation (3) the 'result' shows makespan time or average time of response time of that algorithm we want to compare the improvement of the proposed algorithm over it. Table (8) shows the response time in milliseconds for the Max-Min, Min-Min, Surfage and proposed algorithm in four scenarios. Table (9) shows the percent of improvement of the proposed algorithm in terms of response time covered in this study, and is obtained according to equation (3). In figures (4) And figures (5) the horizontal axis represents the names of the algorithms and the vertical axis represents the average of and response time in milliseconds, as can be seen the proposed algorithm has better results in each of four scenarios ( A, B, C and D). Table 6. Improvement of the proposed algorithm in terms of Make Span in compare of the Min -Min, Max-Min, Sufferage algorithms. Scena ri o A
0.7
14.13
7.49
B
57.74
82.35
86.34
C
5.78
25.23
55.52
D
81.53
82.71
84.05
298
Doostsadigh, E., Asemi, R. & Barari, H., (2015). An Improved Approach for Scheduling Tasks Based on Lottery Algorithm in Cloud Computing Environment, Global Journal on Technology [Online]. 08, pp 291 -301. Available from: http://awer-center.org/gjt/
Table 8. Response time of Algorithms in four scenarios. Scenarios
Max-Min
Min-Min
Surffage
Proposed Algorithm
A B C D
15/57 6/641 12/8 80/19
13/79 8/592 11/568 80/28
14/46 2/778 24/50 93/37
13/15 1/17 10/90 14/28
Table 9. Improvement of the proposed algorithm in terms of Response time in compare of the Min -Min, MaxMin, Sufferage algorithms. Scena ri o
A B C D
4.64 86.33 5.72 82.20
15.50 82.31 14.8 82.18
9.01 57.73 55.48 84.69
Response Time(ms)
25 20 15
senario A 10
senario B senario C
5 0 Max-Min
Min-Min
Surfage
Proposed Algorithm
Algorithms
Figure 4. Response time in scenarios A, B, C.
299
Response Time(ms)
Doostsadigh, E., Asemi, R. & Barari, H., (2015). An Improved Approach for Scheduling Tasks Based on Lottery Algorithm in Cloud Computing Environment, Global Journal on Technology [Online]. 08, pp 291 -301. Available from: http://awer-center.org/gjt/
100 90 80 70 60 50 40 30 20 10 0
senario D
Max-Min
Min-Min
Surfage
Proposed Algorithm
Algorithms
Figure 5. Response time in scenarios D.
6. Conclusions As mentioned in the previous sections, In this study algorithms in terms of the Makespan and average response time have been studied. Sufferage algorithm had the worst time Makespan. This is due, in large part Sufferage algorithm is caught in a local optimum and failed to properly search the problem space. Max-Min algorithm after the Sufferage algorithm had the most time in Makespan. This means that Max-min algorithm is better than Sufferage algorithm and searches better the problem space and less caughts in a local optimum. Min-min algorithm answered better than Max-min and less caught in local optimization. The proposed algorithm is better than the three methods in compared to the previous method, because local optimization has less affected. The results can be accurately identified makespan and the average response time is directly related to each other. The proposed method could improve the makespan time to 36.43 percent and the response time to 47.22 percent. One of the reasons that the proposed algorithm is better is that it has an intelligent act. In the proposed algorithm, at each step a new virtual machine is selected for a task, the wo rkload of the virtual machine has be measured and virtual machines are selected in a lottery step. Virtual machines are more likely to be selected which their workload is less. In fact, this method is always be respected justice because the workload of virtual machines is observed and it has general policy that all virtual machines complete their own work at closely time.
300
Doostsadigh, E., Asemi, R. & Barari, H., (2015). An Improved Approach for Scheduling Tasks Based on Lottery Algorithm in Cloud Computing Environment, Global Journal on Technology [Online]. 08, pp 291 -301. Available from: http://awer-center.org/gjt/
References [1] Vijayalakshmi A., & Lepakshi P., (2013), A study on task scheduling algorithms in cloud computing, International Journal of Engineering and Innovative Technology, (IJEIT), 2(11). [2] IBM virtualization. (2009) from http://www.ibm.com/virtualization. [3] Carolan J., & Gaede S., Baty J., Brunette G., Licht A., Remmell J., Tucker L., Weise J., (2009), Introduction to cloud computing architecture, (1st ed.), White Paper, Sun Micro Systems Inc. [4] Keahey, K., Figueiredo, R., Fortes, J., Freeman, T., & Tsugawa, M. (2008). Science clouds: Early experiences in cloud computing for scientific applications. Cloud computing and applications, 825-830. [5] Selvarani, S., & Sadhasivam, G. S. (2010, December). Improved cost-based algorithm for task scheduling in cloud computing. In Computational Intelligence and Computing Research (ICCIC), 2010 IEEE International Conference on (pp. 1-5). IEEE. [6] Anderson, J. Q., & Rainie, H. (2010). The future of cloud computing. Washington, DC: Pew Internet & American Life Project. [7] Ge Y., & Wei G., (2010), Ga-Based task scheduler for the cloud computing systems, Web Information Systems and Mining (WISM), 2, 181-186. [8] Gao, K., Wang, Q., & Xi, L. (2014). Reduct algorithm based execution times prediction in knowledge discovery cloud computing environment. Int. Arab J. Inf. Technol., 11(3), 268-275. [9] Sa Salot P., (2013), A survey of various scheduling algorithm in cloud computing environment, International Journal of research and engineering Technology (IJRET), 2319-1163. [10] Sindhu, S., & Mukherjee, S. (2011). Efficient task scheduling algorithms for cloud computing environment. In High Performance Architecture and Grid Computing (pp. 79-83). Springer Berlin Heidelberg. [11] Braun, T. D., Siegel, H. J., Beck, N., Bölöni, L. L., Maheswaran, M., Reuther, A. I., & Freund, R. F. (2001). A comparison of eleven static heuristics for mapping a class of independent tasks onto heterogeneous distributed computing systems. Journal of Parallel and Distributed computing, 61(6), 810-837. [12] Freund, R. F., Gherrity, M., Ambrosius, S., Campbell, M., Halderman, M., Hensgen, D., ... & Siegel, H. J. (1998, March). Scheduling resources in multi -user, heterogeneous, computing environments with SmartNet. In Heterogeneous Computing Workshop, 1998. (HCW 98) Proceedings. 1998 Seventh (pp. 184-199). IEEE. [13] Maheswaran, M., Ali, S., Siegel, H. J., Hensgen, D., & Freund, R. F. (1999). Dynamic mapping of a class of independent tasks onto heterogeneous computing systems. Journal of Parallel and distributed Computing, 59(2), 107-131. [14] Bhoi, U., & Ramanuj, P. N. (2013). Enhanced Max-min Task Scheduling Algorithm in Cloud Computing. International Journal of Application or Innovation in Engineering and Management (IJAIEM), ISSN, 23194847. [15] Rajavel, R., & Mala, T. (2012, January). Achieving service level agreement in clou d environment using job prioritization in hierarchical scheduling. In Proceedings of the International Conference on Information Systems Design and Intelligent Applications 2012 (INDIA 2012) held in Visakhapatnam, India, January 2012 (pp. 547-554). Springer Berlin Heidelberg. [16]Dutta, K., Guin, R. B., Chakrabarti, S., Banerjee, S., & Biswas, U. (2012, March). A smart job scheduling system for cloud computing service providers and users: modeling and simulation. In Recent Advances in Information Technology (RAIT), 2012 1st International Conference on (pp. 346-351). IEEE. [17] Ahmadi, M., Shahbahrami, A., & Wong, S. (2011). Collaboration of reconfigurable processors in grid computing: Theory and application. Future Generation Computer Systems, 27(6), 850-859. [18] Shi, Z., & Dongarra, J. J. (2006). Scheduling workflow applications on processors with different capabilities. Future generation computer systems, 22(6), 665-675.
301