Task Aware Switcher Scheduling for Batch Mode Mapping in ...

3 downloads 144 Views 1MB Size Report
Keywords- Independent, Task scheduling, Batch mode, Min-Min, Max-Min, ... They can take advantage of under utilized resources to meet business requirements ... of Advanced Research in Computer Science and Software Engineering 3(6), .... In Min-Min when number of smaller tasks are high with few larger tasks led to ...
Volume 3, Issue 6, June 2013

ISSN: 2277 128X

International Journal of Advanced Research in Computer Science and Software Engineering Research Paper Available online at: www.ijarcsse.com

Task Aware Switcher Scheduling for Batch Mode Mapping in Computational Grid Environment Gaurav Sharma Assistant Professor Department of C.S.E, JMIT, Radaur Yamuna Nagar, Haryana, India

Puneet Banga Research Scholar Department of C.S.E, JMIT, Radaur Yamuna Nagar, Haryana, India

Abstract— Grid computing is a high performance computing environment which is responsible for solving large-scale computational problems. We can see Computational Grids as a next generation computing which is a collection of heterogeneous computing resources connected by a network across geographically dispersed domains to form a distributed high performance computing environment. In Grid computing one of the integral phase is, mapping of task to efficient and best suitable resource. An efficient Grid scheduling is one which maximizes the resource utilization rate and minimizes the processing time of the tasks. Various research has been done on task scheduling, but still further analysis and research needs to be explored to improve the performance of Computational Grid that will capable of achieving intended goals. Keywords- Independent, Task scheduling, Batch mode, Min-Min, Max-Min, Suffrage, RASA. I. INTRODUCTION Grid computing enables organizations to take advantage of various resources across multiple administrative domains in ways not previously possible [1]. They can take advantage of under utilized resources to meet business requirements while minimizing additional costs. The nature of a Grid allows organizations to take advantage of parallel processing, making many applications financially feasible as well as allowing them to complete sooner. Grid computing makes more resources available to more people and organizations while allowing those responsible for the IT infrastructure to enhance resource balancing, reliability, minimal cost and manageability. Grid Scheduling is always the most important and tedious task to perform. The major objective functions to assess a Grid scheduler performance are Makespan, resource utilization rate. Makespan is the time difference between the start time of the first task and the finish time of the last task [2] [3]. We can also treat it as turnaround time in which the time gap between submissions of first task and completion of end task. Actually Makespan is a measure of the throughput of the heterogeneous computing system. The objective of the grid scheduling algorithm is to minimize the makespan. It is well known that the problem of deciding on an optimal assignment of jobs to resources is NP-complete. Another important parameter is Resource utilization which is based on idle time of resources and effective job scheduling is measured by high resource throughput [2] [15]. The motivation behind this research work is to design and implement a new scheduling algorithm under batch/offline mode for independent task scheduling so that to minimize makespan and maximize the average resource utilization rate. Many mapping heuristics algorithms have been devised for batch mode scheduling among which Min-Min and MaxMin, Suffrage, RASA etc. are the simplest and most popular ones. II. BATCH MODE SCHEDULING As there are two types of mapping, one is online/immediate and another one is offline/batch [3] [8] mode. Here in section II we will explain batch mode with examples. Batch mode mapping heuristic is also known as offline mode. In this type of scheduling tasks are not mapped onto the machines as they arrive; instead they are collected into a set that is examined for mapping at prescheduled times called mapping events. Then each task is scheduled according to respective technique as mentioned below: 1. MIN-MIN It consists of two phases. Firstly it begins with the set known as Meta task (MT) of all unassigned tasks. In the very first phase, the set of minimum expected completion time (such that task has the earliest expected completion time on the corresponding machine) for each task in MT is found. In the second phase, the task with the overall minimum expected completion time from MT is chosen and assigned to the corresponding resource [3] [5] [6]. Then this task is removed from MT and the process is repeated until all tasks in the MT are mapped. This heuristic takes O (s2m) time. Here s denotes number of tasks where m is number of machines.

© 2013, IJARCSSE All Rights Reserved

Page | 1292

Sharma et al., International Journal of Advanced Research in Computer Science and Software Engineering 3(6), June - 2013, pp. 1292-1299 Pseudo code for MIN-MIN //-------------------------------------------------------------------------------------------------------Step (1): FOR all tasks ti in MT Step (2): FOR all machines mj Step (3): Compute CTij=ETij+rj [Completion time of task i on machine j] [End step 2 loop] [End step 1 loop] Step (4): Repeat step no. 5 to 11 until all tasks in MT are mapped Step (5): FOR each task ti in MT Step (6): FOR all machines mj Step (7): Search minimum CTij and resource that obtains it [End step 6 loop] [End step 5 loop] Step (8): Assign tp to resource mq that has Minimum completion time among all Step (9): Delete task tp from MT Step (10): Update machine mq availability time Step (11): Update completion time of all unmapped task(s) [End step 4 loop] Step (12): Compute “Makespan” and other important parameters //-------------------------------------------------------------------------------------------------------2. MAX-MIN Max-Min is very similar to Min-Min, except in phase 2 which find maximum unlike Min-Min which selects minimum among all minimum completion time. Max-Min assigns task with maximum expected completion time to the corresponding resource, in phase 2. The machine that has the minimum completion time for all jobs is selected. Then the job with the overall maximum completion time is selected and mapped to that resource. The ready time of the resource is updated. This process is repeated until all the unmapped tasks are assigned. The idea of this algorithm is to reduce the wait time of the large jobs. So, time complexity for Max-Min is same as Min-Min [6]. As we can see the only difference between Min-Min and Max-Min pseudo code is the word Maximum. As this technique believes to execute long task first and allows short tasks to be executed concurrently with the long task, resulting better makespan and even better resource utilization rate and load balancing level, compared to Min-Min that executes all short tasks first and then executes the long task [3] [5]. Pseudo code for MAX-MIN //-------------------------------------------------------------------------------------------------------Step (1): FOR all tasks ti in MT Step (2): FOR all machines mj Step (3): Compute CTij=ETij+rj [Completion time of task i on machine j] [End step 2 loop] [End step 1 loop] Step (4): Repeat step no. 5 to 11 until all tasks in MT are mapped Step (5): FOR each task ti in MT Step (6): FOR all machines mj Step (7): Search minimum CTij and resource that obtains it [End step 6 loop] [End step 5 loop] Step (8): Assign tp to resource mq that has Maximum completion time among all Step (9): Delete task tp from MT Step (10): Update machine mq availability time Step (11): Update completion time of all unmapped task(s) [End step 4 loop] Step (12): Compute “Makespan” and other important parameters //-------------------------------------------------------------------------------------------------------3. SUFFRAGE The idea behind Suffrage is: the task that suffers the most will be scheduled to resource which will execute it in minimum completion time. In this approach the difference between first and second minimum completion time is calculated known as suffrage value. Suffrage algorithm tries to map the most suffered task in terms of its expected completion time. In this method suffrage is calculated for all unassigned tasks and the task which has overall maximum suffrage value is assigned to the machine which gives first minimum completion time. Then that task is removed from unmapped list, then that scheduled machine availability time is updated and above cycle of task allocation repeated till the set of unmapped tasks gets empty [2] [5]. © 2013, IJARCSSE All Rights Reserved

Page | 1293

Sharma et al., International Journal of Advanced Research in Computer Science and Software Engineering 3(6), June - 2013, pp. 1292-1299 Pseudo code for SUFFRAGE //-------------------------------------------------------------------------------------------------------Step (1): FOR all tasks ti in MT Step (2): FOR all machines mj Step (3): Compute CTij=ETij+rj [Completion time of task i on machine j] [End step 2 loop] [End step 1 loop] Step (4): Repeat step no. 5 to 10 until all tasks in MT are mapped Step (5): FOR each task ti in MT  Find the First minimum completion time (F_MIN)  Find the Second minimum completion time (S_MIN)  SUFF: =ABS (S_MIN - F_MIN) [Suffrage value] [End step 5 loop] Step (6): Search the task tp having Maximum Suffrage value among all Step (7): Allocate tp to machine mq that will complete it in minimum time Step (8): Delete task tp from MT Step (9): Update machine mq availability time Step (10): Update completion time of all unmapped task(s) [End step 4 loop] Step (11): Compute “Makespan” and other important parameters //-------------------------------------------------------------------------------------------------------4. RASA Due to pitfalls in Min-Min and Max-Min algorithms found in some special cases led’s to a new scheduling technique. In Min-Min when number of smaller tasks are high with few larger tasks led to imbalance among resources and higher Makespan value. As a result, the makespan of the system is determined by the larger tasks if the number of the smaller tasks is more than the longer ones. Remedy for such type of difficulty is to apply Max-Min algorithm which gives importance to the larger tasks. Max-Min algorithm firstly assigns the large to the resources [4] and then assigns the small ones. Max-min seems to be better choice than the Min-Min algorithm whenever the number of shorter tasks is much more than the longer ones, but in the other cases, early execution of the large tasks might increase the total response time of the system.

Pseudo code for RASA //-------------------------------------------------------------------------------------------------------Step (1): FOR all tasks ti in MT Step (2): FOR all machines mj Step (3): Compute CTij=ETij+rj [Completion time of task i on machine j] [End step 2 loop] [End step 1 loop] Step (4): If the number of resources are “Odd” then:  Schedule task according to Min-Min Else  Schedule task according to Max-Min [End of if-else] Step (5): Repeat step 4 until all tasks are scheduled. Step (6): Compute “Makespan” and other important parameters //-------------------------------------------------------------------------------------------------------So to consider all the scenarios into account a new type of scheduling was proposed. Resource Aware Scheduling Algorithm (RASA) which is actually a hybrid type of scheduling technique uses both (Min-Min and Max-Min) alternatively. It is based on resource count. If the number of available resources is odd then Min-Min is applied to assign the first task, else Max-Min strategy is applied. The remaining tasks are assigned to their appropriate resources by one of the two strategies, alternatively. For instance, if the first task is assigned to a resource by the Min-min strategy, the next task will be assigned by the Max-min strategy. Assume first round begins with the Max-min strategy; the second round will begin with the Min-Min strategy. The time complexity in RASA is same like Min-Min and Max-Min as it uses it in combination. III. PROPOSED ALGORITHM In this section, we will discuss proposed scheduling algorithm known “Task Aware Switcher Scheduling” (TASS) for batch mode mapping. Figure 1 shows Flow chart to will elaborate the concept in an easy way. © 2013, IJARCSSE All Rights Reserved

Page | 1294

Sharma et al., International Journal of Advanced Research in Computer Science and Software Engineering 3(6), June - 2013, pp. 1292-1299 Start Enter the Meta task (MT)

Enter allocated number of Resources with their attributes

Count the number of task(s) in MT NO Is Even?

Set FLAG = 1

YES Set FLAG = 0

While MT! =Null

Is FLAG ==0?

Is FLAG ==1?

Apply Max-Min

Apply Suffrage

Delete the mapped task from MT

Delete the mapped task from MT

Set FLAG = 1

Set FLAG = 0

Compute Makespan and Average Resource Utilization

End

Figure 1: Flowchart of the TASS (proposed) Our proposed scheduling algorithm is based on mapping heuristic approach and is meant for batch mode scheduling discussed in section II. It is inspired from RASA which is actually a hybrid (combination of Max-Min and Min-Min) so our proposed algorithm also uses two different algorithms but it consider task rather than resource count. Our proposed algorithm (TASS) builds a matrix ETC where Cij represents the completion time of the task ti on the resource rj. Here MT shows Metatask which is a set of tasks to b mapped. If the number of task is even, the Max-Min strategy is applied to assign the first task; otherwise the Suffrage strategy is applied. The remaining tasks are assigned to their appropriate resources by one of the two strategies, alternatively. For instance, if the first task is assigned to a resource by the Max-Min strategy, the next task will be assigned by the Suffrage strategy. In the next round the task assignment begins with a different technique from the last round. Experimental results show that if the number of task is “even” it is preferred to apply the Max-Min strategy the first in the first round otherwise is better to apply the Suffrage strategy the first. Pseudo code for TASS (proposed): //-----------------------------------------------------------------------------------------------Step 1: Start © 2013, IJARCSSE All Rights Reserved

Page | 1295

Sharma et al., International Journal of Advanced Research in Computer Science and Software Engineering 3(6), June - 2013, pp. 1292-1299 Step2: If number of tasks in MT are Even then:  Set FLAG: =0 Else  Set FLAG: =1 [End If] Step 3: Repeat step no. 4 and 5 until all tasks in MT are not mapped: Step 4: IF FLAG == 0 then:  Apply “Max-Min” strategy  Schedule task ti on resource rj  Update resource rj availability time  Update completion time of unmapped tasks  Delete that task ti from MT  Set FLAG: =1. [End IF] Step 5: IF FLAG == 1 then:  Apply “Suffrage” strategy  Schedule task ti on resource rj  Update resource rj availability time  Update completion time of unmapped tasks  Delete that task ti from MT  Set FLAG: =0 [End IF] [End step 3 loop] Step 6: End //---------------------------------------------------------------------------------------------------IV. SIMULATION RESULTS This section will show our proposed algorithm with examples and their valuable results after simulation. We would like to show two examples for two different scenarios. First example consists of odd number of tasks and second example is having even number tasks as shown below: Example (1) Table 1: ETC matrix (5 tasks and 2 resources) Task/Resource R1 R2 T1 3 5 T2 5 10 T3 7 11 T4 5 9 T5 2 7

18

17

16

17

16

17 14

14

12 10 8 6 4 2 0

Figure 2: Makespan comparison graph (Example 1) © 2013, IJARCSSE All Rights Reserved

Page | 1296

Sharma et al., International Journal of Advanced Research in Computer Science and Software Engineering 3(6), June - 2013, pp. 1292-1299

100 90 80 70 60 50 40 30 20 10 0

100 79.4

76.5

87.5

85.3

Figure 3: Average Resource Utilization rate comparison graph (Example 1) Example (1) show the case when numbers of task are “Odd” means Suffrage will start the scheduling followed by MaxMin. The remaining tasks are assigned to their appropriate resources by one of the two strategies, alternatively. For instance, if the first task is assigned to a resource by the Max-Min strategy, the next task will be assigned by the Suffrage strategy. In the next round the task assignment begins with a strategy different from the last round. Example (2) Table 2: ETC matrix (6 tasks and 4 resources) Task/Resource

R1

R2

R3

R4

T1

2

8

5

3

T2

10

17

13

12

T3

3

7

6

5

T4

12

20

18

16

T5

5

10

9

8

T6

4

12

10

8

Figure 4: Makespan comparison graph (Example 2) © 2013, IJARCSSE All Rights Reserved

Page | 1297

Sharma et al., International Journal of Advanced Research in Computer Science and Software Engineering 3(6), June - 2013, pp. 1292-1299

86.7

90 80

70

62.5

89.3

73.4

73.4

60 50 40 30 20 10 0

Figure 5: Average Resource Utilization rate comparison graph (Example 2) Example (2) consists of even number of tasks. So we can observe our proposed scheduling (TASS) is showing better results as compared to Min-Min, Max-Min, Suffrage and RASA in terms of both the objectives that minimizes the processing time (Makespan) and maximizes the resources utilization rate in both the examples. V. EXPERIMENT SETUP The above discussed algorithms: Min-Min, Max-Min, Suffrage, RASA and TASS (proposed) are compared on the basis of Makespan and average resource utilization rate. To make the comparison we have developed the functional code in Core Java language on an Intel i5 (2.5 GHz), 4 GB RAM, Microsoft Window based laptop to evaluate the performance of batch mode scheduling. As shown in figure 2 to figure 5 our proposed algorithm (TASS) takes lower value of Makespan and yields higher average resource utilization rate as compared to other mapping heuristic of batch mode scheduling. VI. CONCLUSION AND FUTURE WORK Task scheduling in Grid environment is always a tedious step. Many researchers are still working on it to improve the important parameter(s) that actually reflects the overall efficiency of Grid system. Here we have described independent task scheduling which is an interesting topic. We have highlighted one of the important scheduling mode: batch/offline mode task scheduling. To make the whole Grid system work efficiently, we have to consider efficient task scheduling and to achieve those goals we require suitable resources. Our task scheduling uses two important and famous algorithms that are Max-Min and Suffrage. It is basically a hybrid approach which is inspired by RASA defined in section II. The time complexity of our proposed algorithm is same as Min-Min and Max-Min but it is provides better makespan and also takes efficient resource utilization into their account. In future our proposed algorithm can be modified according dynamic environment in which information regarding tasks and resources is not known in advance and it can also tailored according user priority, their deadline and other QoS parameters. REFERENCES [1] I. Foster, C. Kesselman and S. Tuecke, “The Anatomy of the Grid: Enabling Scalable Virtual Organizations”, in the International J. Supercomputer applications, 15(3), pp.200- 220, fall 2001. [2] T. D. Braun, H. J. Siegel, N. Beck, L. L. Boloni, M. Maheswaran, A. I. Reuther, J. P. Robertson, M. D. Theys, B. Yao, D. Hensgen, and R. F. Freund, "A comparison of eleven static heuristics for mapping a class of independent tasks onto heterogeneous distributed computing systems," Journal of Parallel and Distributed Computing, vol. 61, issue 6, pp. 810-837, Jun. 2001. [3] M. Maheswaran, S. Ali, H. J. Siegel, D. Hensgen, and R. F. Freund, "Dynamic Matching and Scheduling of a Class of Independent Tasks onto Heterogeneous Computing Systems, The 8th Heterogeneous Computing Workshop , pp. 30-44, Apr. 2001. [4] Saeed Parsa and Reza Entezari-Maleki, “RASA: A New Task Scheduling Algorithm in Grid Environment, World Applied Sciences Journal 7 (Special Issue of Computer & IT): 152-160, 2009 ISSN 1818.4952 IDOSI Publications, 2009. [5] Kamali Gupta and Manpreet Singh, “Heuristic Based Task Scheduling In Grid”, International Journal of Engineering and Technology (IJET), Vol 4 No 4 Aug-Sep 2012. [6] He Xiaoshan, Xia-He Sun, Gregor Von Laszewski, 2003. QOS Guided Min-min Heuristic for Grid Task Scheduling. Journal of Computer Science and Technology, pp. 442-451, DOI:10.1007/BF02948918.

© 2013, IJARCSSE All Rights Reserved

Page | 1298

[7]

[8]

[9] [10]

[11] [12]

[13] [14] [15]

Sharma et al., International Journal of Advanced Research in Computer Science and Software Engineering 3(6), June - 2013, pp. 1292-1299 H. Casanova, A. Legrand, D. Zagorodnov and F. Berman, “Heuristics for Scheduling Parameter Sweep Applications in Grid Environments,” Procceding of the 9th heterogeneous Computing Workshop (HCW'00), pp. 349-363, Cancun, Mexico, May 2000. D. Paranhos, W. Cirne, and F. Brasileiro. Trading cycles for information: Using replication to schedule bag-of-tasks applications on computational grids. In International Conference on Parallel and Distributed Computing (Euro-Par), Lecture Notes in Computer Science, volume 2790, pages169–180, 2003. J.M.Schopf, “A General Architecture for Scheduling on the Grid”, special issue of JPDC on Grid Computing, 2002. R. Armstrong, D. Hensgen, and T. Kidd, "The relative performance of various mapping algorithms is independent of sizable variences in run-time predictions”, 7th IEEE Heterogeneous Computing Workshop (HCW '98), Mar. 1998, pp. 79-87. J. Cao, D. P. Spooner, S. A. Jarvis, and G. R. Nudd, “Grid Load Balancing Using Intelligent Agents,” Future Generation Computer Systems, vol. 21 , Issue 1 ,January 2005. R. F. Freund, M. Gherrity, S. Ambrosius, M. Campbell, M. Halderman, D. Hensgen, E. Keith, T. Kidd, M. Kussow, J. D. Lima, F. Mirabile, L. Moore, B. Rust, and H. J. Siegel, “Scheduling resources in multi-user, heterogeneous, computing environments with SmartNet,” 7th IEEE Heterogeneous Computing Workshop (HCW ’98), Mar. 1998, pp. 184–199. Xhafa F,AbrahamA(eds) (2008) Metaheuristics for scheduling in distributed computing environments. Springer,Berlin. A. A. Khokhar, V. K. Prasanna, M. E. Shaaban, and C. L. Wang, “Heterogeneous Computing: Challenges and Opportunities,” IEEE Computer,vol. 26, pp. 18-27, June, 1993. T. D. Braun, H. J. Siegel, N. Beck, L. L. Boloni, M. Maheswaran, A. I. Reuther, J. P. Robertson, M. D. Theys, B. Yao, D. Hensgen, and R. F. Freund, “A Comparison Study Mapping Heuristics for a Class of Meta-tasks on Heterogene ous Computing Systems,” 8th IEEE Heterogeneous Computing Workshop, pp. 15-29, 1999.

© 2013, IJARCSSE All Rights Reserved

Page | 1299

Suggest Documents