New Algorithms For Efficient Scheduling in Grid Ad ...

42 downloads 231 Views 823KB Size Report
of Grid systems on ad-hock wireless networks we propose ... Using the wired Grid scheduling algorithms for .... finder, scheduler, dispatcher, resource responder.
New Algorithms For Efficient Scheduling in Grid Ad-Hoc Networks Bekim Cilku, Aksenti Grnarov Faculty of Contemporary Sciences and Technologies South East European University Ilindenska, 1200 Tetovo Macedonia {b.cilku, a.grnarov}@seeu.edu.mk

Abstract.

The number of devices that can be connected wirelessly in an ad hoc network has increased greatly. Implementation of Grid computing in such environment would create a high processing power by aggregation of processing power of nodes. For implementation of Grid systems on ad-hock wireless networks we propose a new layer called Ad Hoc Grid Layer (AHGL). This layer contains all necessary services for Grid implementation. Considering a dynamic nature of the ad hoc network, it is very important for job execution to select and allocate appropriate processing node. In Grid computing this work is done by the service called scheduler. Using the wired Grid scheduling algorithms for assigning jobs in a Grid ad hoc network is not straightforward. Hence, in this paper we propose new scheduling algorithms which optimize time needed to transmit and execute jobs in Grid environment created on an ad hoc network. Simulation results show that the new proposed scheduling algorithms provide better performances in comparison with application of scheduling algorithms used in wired Grid.

Keywords.

Scheduling algorithms, computing, ad hoc networks.

Grid

1. Introduction Mobile ad-hoc networks are a collection of mobile nodes creating temporary networks without any infrastructures and are usually used when communication is needed immediately in the case of emergency occasion like natural disaster, wildfire or war [1, 2]. Today, the number of devices connected wirelessly has grown greatly, creating an enormous potential for different resource usage [3]. Aggregations of resources open an opportunity to implement Grid computing in the area of ad hoc networks.

Grid computing is a virtualized distributed computing environment that aims selection, sharing, and aggregation of geographically distributed autonomous resources based on the availability, capability, performance, and cost of these computing resources [4]. The most common resource is computing power and memory provided by processors in the grid nodes. The processors can vary in speed, architecture, software platform, and other associated factors, such as memory, storage, and connectivity. Building a Grid platform within unreliable and resource limited network is a challenging task, but also provide opportunity of creating Grid environment in a quick way when computational jobs are needed to be executed in a fast way or when no node is capable to perform this job because of limited performances (processor speed or limited memory). Due to the dynamic nature of ad hoc networks, the process of selecting and allocating computational jobs to available resources in Grid environment must be done automatically and efficiently. This is a task of Grid scheduling service. Scheduling algorithms that are used in wired Grid are not quite appropriate for assignment of Grid jobs in ad hoc networks because of their inherent different infrastructure (different environment for job execution). Based on the time when scheduling decision is made, grid scheduling algorithms can be divided into two categories: static and dynamic scheduling algorithms [5]. In static mode, jobs are assigned once to resource when the cost of job execution can be estimated. On the other hand, when jobs come online it is difficult to predict the job execution. The system needs to be aware of run-time behavior. In this case dynamic mode is used to make load balancing of the system. In this paper we focus on the process of job assignment to the ad hoc network nodes. We

591 st

Proceedings of the ITI 2009 31 Int. Conf. on Information Technology Interfaces, June 22-25, 2009, Cavtat, Croatia

modify some existing scheduling algorithms and also propose some new scheduling algorithms. All algorithms have been implemented as a new module in ns-2 simulator and simulation results show great speed-up of the time needed to execute all the jobs. All this has been achieved through consideration of additional important network parameters during the process of scheduling. The rest of this paper is organized as follows. Section 2 defines the position of the newly proposed Ad Hoc Grid Layer (AHGL) in the network architecture and its functions as a basis for implementation of the new proposed scheduling algorithms. In Section 3 policies, on which designs are modified and new scheduling algorithms proposed, are presented. In Section 4 we describe environment of network simulator, the simulated scenario, and analysis of obtained results. We conclude the paper and present our future work in Section 5.

2. BACKGROUD In [6,7] we have created new implementation of Grid in ad hoc networks realized as a separate layer. This new independent Ad Hoc Grid Layer (AHGL) gives opportunity for scalability without affecting on the other layers of the network architecture. The Ad Hoc Grid Layer is designed as a separate layer in the network architecture of all nodes in the ad hoc grid environment (Fig. 1). Depending on the function of the node, the layer can be in Master or Slave mode. AHGL for a given node is in master mode when that node is supposed to find appropriate resources throughout the ad hoc network, to schedule jobs and to dispatch them to the rest of the nodes. The AHGL for nodes that are meant to receive jobs, execute them and reply with the results, is in slave mode.

Figure 1. Position of the newly proposed AHGL in the ad hoc grid network architecture

All functions of this layer are realized by the means of different services. Depending on the role of the node, the particular services are activated. In AHGL there are implemented six possible services: application interface, resource finder, scheduler, dispatcher, resource responder and task execution service. The first goal of the AHGL layer is to divide the application (job) on small grid tasks (tasklets), which is done by the Application interface service. Dynamic properties of ad hoc networks do not allow a central register node. This is the reason why we have implemented a service which discovers free resources across the network in the moment when there are incoming tasks to be executed. This is done by the resource finder service. The purpose of scheduling service is to find the optimum time for execution of all tasks using a given scheduling algorithm, where the process is influenced by different parameters. The Dispatcher is the fourth service in AHGL and its duty is to dispatch the tasks to the appropriate nodes and to forward the obtained results to the Application interface service. Resource Response Service monitors the available resources for a given node and responds when request packets are received from master node. Task execution is the last service and is activated when the task arrives at the slave node.

3. Scheduling algorithms The most crucial service in a Grid environment is Grid task scheduling. In this paper we present only the scheduling service of the proposed AHGL. It is defined as the process of mapping Grid tasks to the resources. Effectiveness of the Grid systems in ad hoc networks is largely dependent on efficient management of heterogeneous, geographically distributed dynamic resources. The scheduler has the responsibility of selecting resources and scheduling tasks in such a way that the user and application requirements are met, in terms of overall execution time and cost of the resources utilized [8]. During the process of resource selection, Grid scheduling algorithm used for ad hoc network environment must take into consideration additional parameters that influence time of Grid processing. Such parameters are: start and end time of the nodes’ availability (TS, TE), effective (available) time of the node (TEFF), processor speed (CPU), number of instructions (Nins), task size (L), network

592

throughput (rate) (R), number of hops (N), round trip time (RTT) and the battery energy available (B). Based on these parameters we have proposed five scheduling algorithms; two of them are modifications of already existing wireline algorithms and the other three are new proposed algorithms. Modified algorithms are greedy algorithm and simulated annealing, while the new proposed algorithms are scheduling based on hop-count, scheduling based on RTT, and scheduling based on overall tasklets transmission and execution time. In the greedy algorithm (GA) we create two queues, the first one for jobs and the second one for nodes. At the jobs queue as sorting factor is considered the number of instruction that a tasklet has. Tasks with the highest number of instructions are on the front of the queue, while tasks with the lowest number of instructions are at the end of the job queue. On the other side, the position of the node in the node queue is based on the processor speed of that node. At the front of the queue are nodes with fastest processors while on the end of queue are nodes with slowest processors. The point is to assign tasks with the highest number of instructions to the nodes with the fastest processors. Simulated annealing (SA) is a random-search technique which exploits an analogy between the way in which a metal cools and freezes into a minimum energy crystalline structure (the annealing process) and the search for a minimum in a more general system [9]. Based on the annealing analogy, we have implemented the SA as a scheduling algorithm. SA firstly defines the number of scenes (N), which is dependable on the number of available nodes (Nnodes) and constant (K). Scene (S) is a random assignment of the tasks to the nodes. SA simulates N scenes, and makes their comparison. At the end SA gives us as a result the scene with the lowest execution time of all tasks. Scheduling based on hop-count (S-HOP) is a new proposed scheduling algorithm which is based on the number of hops that a task has to pass to reach the assigned node. The main thought for this algorithm is to assign the tasks to the nearest node, actually to the nodes that can be reached with fewer hops. This is achieved through sorting the node queue by the number of hops, where the nearest nodes are at the front of the queue. The process of assignment of the tasks to the nodes follows after the sorting. Scheduling based on Round-Trip-Time (SRTT) is also e new proposed algorithm similar to

the S-HOP algorithm. The main difference between these two algorithms is that in S-RTT, instead of hop-count as sort parameter, we use round-trip-time (RTT) for each node. Nodes that have shorter RTT are at the front of the node queue and the scheduler assigns tasks firstly to this nodes. Scheduling based on task transmission and execution time (T-ALL) is the last new proposed scheduling algorithm. This algorithm is based on transmission and execution time of each task on every node that is part of Grid ad hoc environment. Start

From 1 to Z

From 1 to N

Calculate n

stop

No

Can be assigned?

Yes

Select node min(Tn)

TEFF = TEFF – tprocessing Ts = Ts + tprocessing

Result table

End

Figure 2. T-ALL scheduling algorithm

Figure 2 present the flow of this algorithm. Z denotes number of all tasklets and N =number of nodes. Tasklets are selected in the same order as

593

they arrive in the queue. With Tn we denote time that is needed to send the a tasklet at node n, execute, and return the result. Algorithm has to pass and calculate tasklets transmission and execution time for all nodes (n=1,..N), and as a result to assign the tasklet to the node which will return result for minimal time. If the nodes have insufficient resources to execute the tasklets then all process of scheduling is stopped. During the process of task scheduling, TALL algorithm also takes into consideration the time when node start to be available (TS), and the effective time of the node (TEFF), by updating this parameters when a tasklet is assigned to the node. As the end, T-ALL algorithm will provide a table with information about which task on which node is assigned.

4. Implementation simulator NS-2

in

the

network

For performance analysis of the scheduling algorithms in an ad hoc grid, the previously introduced AHGL and proposed scheduling algorithms were implemented as an extension to the commonly used NS-2 network simulator [10].

from 0 to 2 hours. The tasklets size is from 5 to 30 KB and the number of instructions for one task is calculated as a square from the tasklets size. The time for execution of all the tasks is measured from the moment of dispatching the first task in AHGL until the last result is received. The obtained results from each simulation are presented as a proportion of execution time of the tasks scheduled by appropriated algorithms and execution time of the same jobs in the same network scheduled by first-come-first-serve algorithm. This is done to see the scale of speed-up that can be achieved using different algorithms for scheduling. There are three types of scene simulations. The first simulation scene (Figure 4. and Figure 5.) is done by execution of 15 different tasklets on 30 nodes. The second simulation scene (Figure 6. and Figure 7.) is done by execution of 30 tasklets on 30 nodes, and the third scene (Figure 8. and Figure 9.) by execution of 45 tasklets on 30 nodes. For all the scenes we have simulated a case when all slave nodes are available immediately for task execution (Ts=0) and the case when the node needed to execute the tasklets will be available in different moment of the time interval between 0 and 300s (Ts=0-300s).

Figure 4. Speed-up for 15 tasklets with Ts=0s Figure 3. Topology of Ad Hoc network used in simulations

Application execution is simulated for a different number of tasklets (15, 30, and 45) in an ad hoc network with 30 nodes (Figure 3). The nodes are randomly scattered on a 600 x 600 m terrain, and the number of hops needed to reach the farther node is 3. Transmissions speed between devices is 1 Mbps. The CPU is in range from 0.5 to 3.5 GHz. Every node has physical memory of 512 MB and available battery energy

From Figure 4, we can see that T-ALL and S-HOP scheuling algorithm speed-up the process of job execution more then 15% compared with FCFS algorithm. When the slave nodes are not avaliable immediately (Figure 5) then only Annealing and T-ALL algorithms speed-up is more then 18% compared to FCFS, while SRTT, GA, and S-HOP show very low percent of speed-up.

594

Figure 5. Speed-up for 15 tasklets with Ts=0300s

Figure 8. Speed-up for 45 tasklets with Ts=0s

Figure 6. Speed-up for 30 tasklets with Ts=0s

Figure 9. Speed-up for 45 tasklets with Ts=0300s

From the gained results we can see that execution speed-up is more stressed when the number of tasklets is less than the number of available nodes. Figure 10 presents time that algorithms spend to assign tasklets to the nodes. The mesures were done for sheduling of 5,10,15,20,30, and 40 tasks on 30 nodes. Only the use of annealing algorithm lineary increases scheduling time as a function of nodes number, while the sheduling time of the other algorithms is almost uninfluenced.

Figure 7. Speed-up for 30 tasklets with Ts=0300s

When number of tasks is equal to the number of avaliable nodes (Figure 6 and 7), TALL algoritham has the highest speed-up, but at lower percent compared with the a case when the the number of tasks is less then a number of avaliable nodes (Figure 4 and 5). According to figurees 7 and 9 one can see that GA algorithm is not appropriate for use when the number of task is higer or equal to the number of nodes, and those nodes are avaliable at diferent time interval (Ts=0-300s). Figure 10. Time of scheduling

595

5. Conclusions and future work 6. References In this paper we have proposed the new layer (AHGL) and five new scheduling algorithms for ad hoc Grid systems. The AHGL is very helpful and necessary for Grid systems implementation in ad-hoc wireless networks. It contains all services that are mandatory for efficient applications execution in ad hock Grid systems. Two of the proposed scheduling algorithms are modifications of already existing algorithms in wireline Grids and the other three are the new ones. The algorithms take into consideration parameters that influence time of Grid processing. They include parameters such as: start and end time of the nodes availability (TS, TE), effective (available) time of the node (TEFF), processor speed (CPU), number of instructions (Nins), task size (L), network throughput(rate) (R), number of hops (N),and round trip time (RTT). We simulate the case when the number of tasks is in half with the number of available nodes, the case when the number of tasks is equal with the number of nodes, and the last case when the number of tasks is one and a half from the number of nodes. Simulation results show that the new proposed scheduling algorithms for Grid computing in an ad hoc network are efficient and that they speed-up the process of job and tasklets execution in all three cases. Comparing the results in all simulation scenarios, T-ALL algorithm made the best scheduling by executing the jobs and tasks in the shortest time. In our future work we will extend the policy of scheduling algorithms by increasing the number of parameters that have to be considered in process of scheduling. At the moment we have not predicted the case when an active node is disconnected or disappears from the ad hoc network. For this case it is preferable to implement check points of task execution, and the scheduling service should be able to reschedule the tasks from the last known successful check point.

[1] Dimitar R. Trajanov, Sonja Filiposka, Aksenti Grnarov, “Connection Availability Model for Mobile Ad hoc Networks Using Reactive Routing Protocols”, IASTED, California, USA, 2003 [2] Trajanov Dimitar, Filiposka Sonja, Cilku Bekim, Grnarov Aksenti,” Link Reliability Analysis in Ad hoc Networks”, XII Telekomunikacioni forumTELFOR 2004, Serbia & Montenegro,2004 [3] Trajanov Dimitar, Filiposka Sonja, Efnusheva Marija, Aksenti Grnarov, Impact of Mobility on Ad hoc Networks Connection Availability”, Med Hoc Net,Turkey, 2004 [4] Daniel Minoli. A networking approach to GRID COMPUTING. John Wiley & Sons,Inc.2005. [5] A. Rasooli, M. Mirza-Aghatabar, and S. Khorsandi. Introduction of Novel Rule Based Algorithms for Scheduling in Grid Computing Systems; Second Asia International Conference on Modeling & Simulation, 2008. [6] B. Cilku. Grid computing in mobile Ad Hoc networks; Master thesis, August 2007. [7] A. Grnarov, B. Cilku, I. Miskovski, S. Filiposka, D. Trajanov, Grid Computing Implementation in Ad Hoc Networks, International Joint Conferences on Computer Information and Systems Sciences and Engineering 2007,Bridgeport CT, USA, 2007. [8] Maozhen Li, Mark Baker. The Grid Core Technologies. John Wiley & Sons Inc. 2005. ISBN-13 978-0-470-09417-4. [9] F. M. Aydin, and T. Fogarty. A Distributed Evolutionary Simulated Annealing Algorithm for Combinatorial Optimisation Problems; Journal of heuristic, may 2004; [10]The network simulator - NS-2 Available: http://www.isi.edu/nsnam/ns

596

Suggest Documents