# Fault Tolerant PLBGSA: Precedence Level Based Genetic Scheduling Algorithm for P2P Grid

Authors: Piyush Chauhan; Nitin
Journal: Journal of Engineering
 (2013)

---

## Abstract

Due to monetary limitation, small organizations cannot afford high end supercomputers to solve highly complex tasks. P2P (peer to peer) grid computing is being used nowadays to break complex task into subtasks in order to solve them on different grid resources. Workflows are used to represent these complex tasks. Finishing such complex task in a P2P grid requires scheduling subtasks of workflow in an optimized manner. Several factors play their part in scheduling decisions. The genetic algorithm is very useful in scheduling DAG (directed acyclic graph) based task. Benefit of a genetic algorithm is that it takes into consideration multiple criteria while scheduling. In this paper, we have proposed a precedence level based genetic algorithm (PLBGSA), which yields schedules for workflows in a decentralized fashion. PLBGSA is compared with  existing genetic algorithm based scheduling techniques. Fault tolerance is a desirable trait of a P2P grid scheduling algorithm due to the untrustworthy nature of grid resources. PLBGSA handles faults efficiently.


---

## Body

## 1. Introduction

As the complexity of computational problems is increasing continuously, efficient use of computational resources becomes vital. Complex tasks are causing bottlenecks in performance throughout the technical arena. Organizations around the world use high-end computational devices, servers, and supercomputers to handle complex tasks. However, all organizations are not able to purchase such devices because of budget constraints. Grid computing has come up as a crusader to solve a highly complex task [1, 2]. Grid utilizes existing heterogeneous computational devices spread across multiple geographical locations [3]. This unification of computational resources yields manifold increase in computational capabilities. Initially central scheduler based scheduling algorithms were used by researchers to solve complex problems [4]. These techniques were effective in scheduling [5] complex task; however, they have many limitations, like the fact that failure of central scheduler causes collapse of the entire grid [6]. Limited capabilities of the central scheduler give way to scalability issues. Policies vary from company to company and political issues also caused the existence of central scheduler problematic [6].Metascheduler deals with limitations of central scheduler to some extent [7]. In metascheduling, all clusters have their personal scheduler. DAG based tasks [8] are scheduled over the most capable cluster. Problem with global task scheduling arises when no cluster is capable of executing complex computational task. The drawback of metascheduler is that it cannot execute gigantic tasks using miniscule clusters and single computational resources, spread across various geographical domains. P2P technologies [9] are effective enough to act as decentralized grid scheduler. Decentralization makes our grid robust against grid node failures. Moreover, structure of P2P grid does not cause scalability issues and other bottlenecks. Further, complex problems are solved efficiently using genetic algorithm. P2P [10] grid also uses genetic algorithm to obtain good results [11]. Initially, to get results quickly, researchers schedule independent gigantic tasks [11] which are generated on single grid node over P2P grid resources [12]. Parallel execution of such tasks over various P2P resources produced results quickly. DAG based tasks [13] require extra precision in scheduling when scheduled over grid. Intertask dependencies makes it tough to schedule subtasks of DAG based task, as efficiently as independent tasks. Researchers in [14] have used genetic algorithm to schedule subtasks of DAG based task [15]. Authors of [14] have applied a genetic algorithm to find schedule for DAG based tasks in one go. The probability of finding nearly optimal results decreases as tasks of DAG are divided across various precedence levels.Our approach says that we have to apply genetic algorithms to obtain the schedule for subtasks of one precedence level at one time. Also, if there is a single subtask at any precedence level, then we schedule subtask on P2P grid resource which gives results quickly. In this way, subtasks of DAG based task is scheduled over P2P grid resources from one precedence level to another. The probability of finding a nearly optimal schedule is higher with the approach adopted in this paper.Rest of paper is organized as follows literature review is given in Section2. Background of genetic algorithm and DAG based task scheduling using it is explained in Section 2. We have proposed fault tolerant precedence level based genetic scheduling algorithm for P2P Grid in Section 3. In Section 4, we have represented and discussed simulation results. Conclusion and future scope of work are discussed in Section 5. The symbols which are used throughout the paper are presented in the Abbreviations.


## 2. Literature Review of Decentralized Scheduling Techniques Using Genetic Algorithm to Schedule Tasks

Holland first explained genetic algorithm in 1975. In the last decade, genetic algorithms have been used by various researchers to schedule tasks over grid. Both independent and interdependent tasks were scheduled using genetic algorithms. Estimation of distribution algorithm (EDAs) is a new class of evolutionary algorithms. In EDAs, promising schedules are obtained by means of probabilistic model. EDAs give better schedules as compared to the evolutionary algorithms mentioned in [16]. In Section 2.1, we have described some remarkable decentralized scheduling techniques using genetic algorithm to schedule independent tasks. Section 2.2 highlights decentralized scheduling algorithm employing genetic algorithm to schedule subtasks of workflow.


### 2.1. Decentralized Scheduling Techniques Using Genetic Algorithm to Schedule Independent Tasks

One of the eminent papers which applied genetic algorithm to schedule independent tasks over heterogeneous resources in fully decentralized fashion is given in [17]. Scheduling applications using genetic algorithms (SAGA) were proposed in [17]. In the SAGA, computational nodes can connect and leave system dynamically. This system utilizes lookup services to work as decentralized scheduler. The SAGA emphasizes on splitting the task sets and heterogeneous resources into subparts. Moreover, algorithm is run on each subpart. In the SAGA, firstly scheduling request is put forward by user. By using grid monitoring service (MonALISA) [18], we obtain monitoring data and scheduling request. After this, near optimal schedule is obtained by using monitoring data and scheduling request. Execution services then execute this near optimal schedule. Discovery service is provided in the SAGA to handle failure and incorporate new computational resources. Schedule and task information of executed jobs are provided as feedback to the user. This algorithm decreases the number of generations required in a genetic algorithm to yield efficient schedule.Decentralized grid scheduling is achievable using P2P technique and it was proved in [11]. In [11], after authorization and authentication checks, any grid node can issue a job submission query. Cyclone is recursively accessed to find β×N nodes. β is a parameter of the algorithm. N Nodes which decrease optimization function give the first schedule. It is impossible to investigate all possible permutations of N nodes out of total β×N. Only in two cases (N is exceptionally petite or β≈1), we can investigate all permutations. Thus, genetic algorithm is used for the selection process to obtain nearly optimal schedules. A limitation of this algorithm is that it can only schedule independent tasks like SAGA.


### 2.2. Decentralized Scheduling Techniques Using Genetic Algorithm to Schedule Subtasks of DAG Based Task

In grid environment, genetic algorithm [19] was used to schedule [20] DAG based task in [14]. We know that scheduling subtasks of DAG based task over a grid is an NP hard problem. Genetic algorithm and other stochastic search algorithms are utilized to obtain near optimal schedule for DAG based task’s scheduling on grid nodes.DAG based workflow chosen by us to put into operation [14] is shown in Figure 1(a). DAG based task t is divided into 10 subtasks. These subtasks are further subdivided into four precedence levels. Once all subtasks of previous precedence level have returned results to origin node, subtasks at next precedence level start executing in parallel. Subtasks present at the same precedence level are executed in parallel on the separate grid nodes. Virtual network topology followed to be simulated [14] by us is shown in Figure 1(b). DAG based task t is generated at origin node (N0). We used genetic algorithm to schedule subtasks of t over grid nodes N0, N1, N2, and N3.(a) DAG based sample taskt; (b) virtual network topology.
(a)
(b)Figure2 represents how [14] used genetic algorithm to schedule subtasks of DAG based task t. Initial population of schedules is produced in [14] by arbitrarily assigning every subtask to a grid node. Offspring for the next generation are chosen from an initial population using roulette wheel selection method. Authors have applied genetic operators on these shortlisted schedules to obtain the rest of population for given generation. Genetic operators used are crossover and mutation. When stagnation in population arises, then the probability of mutation increases. From population, the best DNA representing schedule for subtasks of t is chosen.Figure 2
DNA representing scheduling for subtasks of taskt and use of genetic algorithm to obtain good schedule.We know subtasks oft are divided into precedence levels. Subtasks at the same precedence level can be executed in parallel on different grid nodes. A prerequisite for subtasks at level l to start execution is that subtasks at level l-1 have finished and returned results. This sequence is followed in DNA representation of the schedule. Subtask at the first level is the first subtask at the top of DNA. If more than one subtask is assigned to the node, then the subtask which comes first in DNA will be executed first. Figure 3 explains the sequence in which subtasks of t assigned to same node will be executed. In Figure 3, subtasks at the same precedence level are having the same color. Subtasks of level 3 are represented by orange color. Level 3 subtasks will start executing once subtasks at level 2 have finished and delivered results. Level 2 tasks are represented by green boxes and will execute in parallel on different nodes. In case grid node leaves the grid, we have to reschedule all subtasks of t again using [14].Figure 3
The sequence in which subtasks oft, assigned to the same node, will be executed.In P2P grid, nodes can leave freely. Hence, our algorithm exploits precedence level approach to handle node failures.


## 2.1. Decentralized Scheduling Techniques Using Genetic Algorithm to Schedule Independent Tasks

One of the eminent papers which applied genetic algorithm to schedule independent tasks over heterogeneous resources in fully decentralized fashion is given in [17]. Scheduling applications using genetic algorithms (SAGA) were proposed in [17]. In the SAGA, computational nodes can connect and leave system dynamically. This system utilizes lookup services to work as decentralized scheduler. The SAGA emphasizes on splitting the task sets and heterogeneous resources into subparts. Moreover, algorithm is run on each subpart. In the SAGA, firstly scheduling request is put forward by user. By using grid monitoring service (MonALISA) [18], we obtain monitoring data and scheduling request. After this, near optimal schedule is obtained by using monitoring data and scheduling request. Execution services then execute this near optimal schedule. Discovery service is provided in the SAGA to handle failure and incorporate new computational resources. Schedule and task information of executed jobs are provided as feedback to the user. This algorithm decreases the number of generations required in a genetic algorithm to yield efficient schedule.Decentralized grid scheduling is achievable using P2P technique and it was proved in [11]. In [11], after authorization and authentication checks, any grid node can issue a job submission query. Cyclone is recursively accessed to find β×N nodes. β is a parameter of the algorithm. N Nodes which decrease optimization function give the first schedule. It is impossible to investigate all possible permutations of N nodes out of total β×N. Only in two cases (N is exceptionally petite or β≈1), we can investigate all permutations. Thus, genetic algorithm is used for the selection process to obtain nearly optimal schedules. A limitation of this algorithm is that it can only schedule independent tasks like SAGA.


## 2.2. Decentralized Scheduling Techniques Using Genetic Algorithm to Schedule Subtasks of DAG Based Task

In grid environment, genetic algorithm [19] was used to schedule [20] DAG based task in [14]. We know that scheduling subtasks of DAG based task over a grid is an NP hard problem. Genetic algorithm and other stochastic search algorithms are utilized to obtain near optimal schedule for DAG based task’s scheduling on grid nodes.DAG based workflow chosen by us to put into operation [14] is shown in Figure 1(a). DAG based task t is divided into 10 subtasks. These subtasks are further subdivided into four precedence levels. Once all subtasks of previous precedence level have returned results to origin node, subtasks at next precedence level start executing in parallel. Subtasks present at the same precedence level are executed in parallel on the separate grid nodes. Virtual network topology followed to be simulated [14] by us is shown in Figure 1(b). DAG based task t is generated at origin node (N0). We used genetic algorithm to schedule subtasks of t over grid nodes N0, N1, N2, and N3.(a) DAG based sample taskt; (b) virtual network topology.
(a)
(b)Figure2 represents how [14] used genetic algorithm to schedule subtasks of DAG based task t. Initial population of schedules is produced in [14] by arbitrarily assigning every subtask to a grid node. Offspring for the next generation are chosen from an initial population using roulette wheel selection method. Authors have applied genetic operators on these shortlisted schedules to obtain the rest of population for given generation. Genetic operators used are crossover and mutation. When stagnation in population arises, then the probability of mutation increases. From population, the best DNA representing schedule for subtasks of t is chosen.Figure 2
DNA representing scheduling for subtasks of taskt and use of genetic algorithm to obtain good schedule.We know subtasks oft are divided into precedence levels. Subtasks at the same precedence level can be executed in parallel on different grid nodes. A prerequisite for subtasks at level l to start execution is that subtasks at level l-1 have finished and returned results. This sequence is followed in DNA representation of the schedule. Subtask at the first level is the first subtask at the top of DNA. If more than one subtask is assigned to the node, then the subtask which comes first in DNA will be executed first. Figure 3 explains the sequence in which subtasks of t assigned to same node will be executed. In Figure 3, subtasks at the same precedence level are having the same color. Subtasks of level 3 are represented by orange color. Level 3 subtasks will start executing once subtasks at level 2 have finished and delivered results. Level 2 tasks are represented by green boxes and will execute in parallel on different nodes. In case grid node leaves the grid, we have to reschedule all subtasks of t again using [14].Figure 3
The sequence in which subtasks oft, assigned to the same node, will be executed.In P2P grid, nodes can leave freely. Hence, our algorithm exploits precedence level approach to handle node failures.


## 3. Fault Tolerant Genetic Algorithm Based Decentralized Scheduling Technique for P2P Grid

In this paper, we have proposed a decentralized scheduling technique for P2P grid, which utilizes a precedence level based genetic algorithm (PLBGSA) to schedule subtasks of DAG based taskt. In DAG based task, subtasks have intertask dependencies. In addition to schedule subtasks over various grid nodes, we have to find out the associated computation and communication cost [21]. We store in all P2P nodes a list α mentioned in [22]. This list α is modified whenever scheduling happens. Accordingly, neighbors also modify their list α. In [23], authors put forward the concept of workload (computing field) of subtask over any P2P grid resource. It is given in (1) as follows:
(1)CF=∑a=1bTaPr×MIPSPr,
where Pr represents the total number of processing elements present in P2P grid node. MIPSPr the gives number of million instructions per second single processing element can process. Ta is size in million instructions of ath waiting subtask in the task queue of b length on grid node. Communication cost [22] is the time to send subtask from one node to another, explained by (2) as follows:
(2)TrtXNSTjil=(TaKbWszxy)×RTxy.
In the above equation, Wszxy is window size and RTxy is round trip time between nodes x and y. Size of subtask a in Kb is represented by TaKb. Subtask will also depend upon time consumed to finish subtasks at a previous precedence level and to return results to the origin node. Previous algorithms, have used DNA containing details of all subtasks of DAG based task t. Genetic algorithm was applied using initial population of randomly generated DNAs. Task t shown in Figure 1(a) is divided into precedence levels. In our proposed approach, when any precedence levels contain only one subtask, we need not to apply genetic algorithm on that particular subtask. Instead, we calculate finish time of subtask on all available P2P grid nodes. Finally, we schedule single subtask on the node which gives fastest result. As shown in Figure 4, single subtask t0 is scheduled without using genetic algorithm. This scheduling value for t0 is stored in list α. This value will be taken as prerequisite to schedule subtasks at the next level.Figure 4
Diagrammatic presentation of PLBGSA.On the other hand, if precedence level of subtask contains more than one subtask, we use a genetic algorithm to find good schedule. As shown in Figure4, at precedence level 2, five subtasks are present. Schedule to finish these 5 subtasks is represented by DNA. N such DNAs are randomly generated for initial generation. The Z such generations are generated by applying genetic operators on shortlisted DNAs of previous generation. Crossover and mutation are genetic operators used in this paper. The roulette wheel selection technique is used to shortlist DNAs from all DNAs present at any generation. We select DNA from all these generations such that it finishes subtasks the fastest. We schedule using the best schedule among all generations. Values are stored accordingly in list α. Again, we apply genetic algorithm for subtasks at level 3 and find good schedule. Scheduling is performed according to this good schedule and list α will be updated. Again, there is a single task t9 in level 4, just like in level 1. Hence, t9 is scheduled on node giving results fastest. This way all subtasks of DAG based task t are scheduled.Algorithm for PLBGSA is shown in Figure5. In this algorithm, first we arrange all subtasks in priority based task sequence β. Assign level l value 1. Choose all j subtasks present at level l from β. If only one subtask is present at level l, then single subtask STSl is assigned to a node having minimum WldNSTS. WldNSTS is workload after subtask STSl is assigned to node N. Range of N is 0 to P-1, where P represents the number of P2P grid nodes available for scheduling. If more than one subtask is present at level l, we use genetic algorithm to schedule all subtasks on set P. While applying genetic algorithm, first we generate an initial population of N DNAs. To obtain single DNA we use RnG and assign all STjl to set P·STjl represents a set of j subtasks present at level l from β. Then we calculate Ftm_STjl for DNA. Finish time value of Sdjil is made equal to Ftm_STjl. Further, generations are obtained by applying genetic operators on the previous generation. Ftm_STjl will be calculated by scheduling subtasks at level 2 one by one in sequence in which they are found in β. Consider
(3)Ftm_STjl=mini∈[0,j]{CFcSTjil}.
When we schedule subtask, workload of the node on which subtask is scheduled will also vary. This new workload will be as follows:
(4)CFcSTjil=MEF+tldCSTjil,MEF=max{CFcold,TrtXNSTjil,Rbkl-1}.
Here, MEF is the most efficient factor and will be the greatest of these three values. First value is the old workload on P2P grid node CFcold. Second is transport time TrtXNSTjil to send a task from one node to another. Rbkl-1 is the third value which gives time when all subtasks at previous level will be finished and had returned results. An origin node where task t is generated will use these values to make a scheduling decision. However, entities in list α are changed when we have found the best schedule using genetic algorithm. We shortlist m schedules from an initial population by applying roulette wheel selection method (RWS). This way second generation’s first m schedules will be obtained from predecessors. We choose two schedules Sd1stl, Sd2ndl from these m schedules and apply CxGO, MtGO genetic operators. Two new schedules will be obtained by this method. In this manner q new schedules for second generation are obtained. MtGO is a mutation operator which will be applied more often if stagnation in schedules occurs. We shortlist Sdsmallestl from Rng_Sd and schedule according to Sdsmallestl. Update list α according to Sdsmallestl. Similarly, we calculate Sdsmallestl for all levels and update list α accordingly for all levels. Finally, at level l having value MaxLevel,Sdsmallestl represents finish time for task t. The schedule obtained using this algorithm is better than the algorithm presented in [14]. Our proposed algorithm is depicted in Table 1.Table 1
Fault tolerant PLBGSA for P2P grid.
Begin
Cost
Time
(1)
Construct priority based subtask sequenceβ
c
1
1
(2)
Assign levell=0
c
2
1
(3)
Do
c
3
n
+
1
(4)
Choose allj subtasks present at level l from β
c
4
n
+
1
(5)
if  Ntl==1
c
5
n
+
1
(6)
Single subtaskSTSl assigned to node having minimum
c
6
n
+
1
Wld
N
ST
S where N∈[0,P-1]
(7)
Endif
(8)
if  Ntl>1
c
7
n
+
1
(9)
for  i=0 to h
c
8
(
n
+
1
)
(
n
+
1
)
(10)
UsingRnG  assign all STjl to set P
c
9
n
(
n
+
1
)
(11)
CalculateFtm_STjl
c
10
n
(
n
+
1
)
(12)
Finish time value ofSdjil=Ftm_STjl
c
11
n
(
n
+
1
)
(13)
Endfor
(14)
GNo=2
c
12
n
+
1
(15)
for  i=h  to (u×h)-1
c
13
(
n
+
1
)(k·n+1)
(16)
if  i%h==r where r∈[0,k-1]
c
14
k
·
n
(
n
+
1
)
(17)
UsingRWS choose Sdjil schedule from Rng_Sd
c
15
(
n
+
1
)
(
k
·
n
-
1
)
whereRng_Sd∈[(i-h+r),(h-r+1)]
(18)
CalculateFtm_STjl
c
16
(
n
+
1
)
(
k
·
n
-
1
)
(19)
Endif
(20)
if  i%h==e where e∈[k,(GNo×h)-1]
c
17
(
k
·
n
)
(
n
+
1
)
(21)
ShortlistSd1stl and Sd2ndl from Rng_Sd
c
18
(
n
+
1
)
(
k
·
n
-
1
)
whereRng_Sd∈[((GNo×h)-h),((GNo×h)-h+k)]
(22)
usingCxGO (occasional MtGO) on Sd1stl and Sd2ndl we obtain Sdjil
c
19
(
n
+
1
)
(
k
·
n
-
1
)
(23)
CalculateFtm_STjl
c
20
(
n
+
1
)
(
k
·
n
-
1
)
(24)
if  e==(GNo×h)-1
c
21
(
n
+
1
)
(
k
·
n
-
1
)
(25)
GNo
+
+
c
22
(
n
+
1
)
(
k
·
n
-
2
)
(26)
Endif
(27)
if  i==(u×h)-1
c
23
(
n
+
1
)
(
k
·
n
-
1
)
(28)
ShortlistSdsmallestl from Rng_Sd where Rng_Sd∈[0,
c
24
(
n
+
1
)
(
k
·
n
-
2
)
((u×h)-1)]
(29)
for  f=h to (u×h)-1
c
25
(
k
·
n
-
2
)
(
k
·
n
+
1
)
(
n
+
1
)
(30)
Sdjfl=Sdsmallestl
c
26
(
n
+
1
)
(
k
·
n
-
2
)
(
k
·
n)
(31)
Endfor
(32)
Endif
(33)
Endif
(34)
Endfor
(35)
Endif
(36)
if  NdF==1
c
27
(
n
+
1
)
(
n
+
1
)
(37)
Remove failed node from setP
c
28
n
(
n
+
1
)
(38)
Goto step 3
c
29
n
(
n
+
1
)
(39)
End if
(40)
l
+
+
c
30
(
n
+
1
)
(
n
+
1
)
(41)
while  l<= Max Level
c
31
(
n
+
1
)
(
n
+
1
)
(42)
End do While
(43)
Finish time forSdsmallestl at level l= Max Level will be the finish time of
c
32
1
taskt
ENDFigure 5
Working of fault tolerance in PLBGSA.In Table1, cost is the statement that takes ci steps to execute and ci step executes n times. Hence, we find that, in the worst case, the running time of the above scheduling algorithm is
(5)T(n)=c1·1+c2·1+c3·(n+1)+c4·(n+1)+c5·(n+1)+c6·(n+1)+c7·(n+1)+c8·[(n+1)(n+1)]+c9·[n·(n+1)]+c10·[n·(n+1)]+c11·[n·(n+1)]+c12·(n+1)+c13·[(k·n+1)(n+1)]+c14·[k·n(n+1)]+c15[(k·n-1)(n+1)]+c16[(k·n-1)(n+1)]+c17·[k·n(n+1)]+c18[(k·n-1)(n+1)]+c19·[(k·n-1)(n+1)]+c20·[(k·n-1)(n+1)]+c21·[(k·n-1)(n+1)]+c22·[(k·n-2)(n+1)]+c23·[(k·n-1)(n+1)]+c24·[(k·n-2)(n+1)]+c25·[(k·n-2)(k·n+1)(n+1)]+c26·[(k·n-2)×k·n(n+1)]+c27·[(n+1)(n+1)]+c28·[n(n+1)]+c29·[n(n+1)]+c30·[(n+1)(n+1)]+c31·[(n+1)(n+1)]·+c32·1,
which on simplifying gives
(6)T(n)=(c25·k2+c26·k2)n3+((k2-k)c8+c9+c10+c11+c13·k+c14·k+c15·k+c16·k+c17·k+c18·k+c19·k+c20·k+c21·k+c22·k+c23·k+c24·k+c25·(k2-k)+c26·(k2-2k)+c27+c28+c29+c30+c31(k2-k))n2+(c3+c4+c5+c6+c7+2·c8+c9+c10+c11+c12+c13·(k+1)+c14·k+c15·(k-1)+c16·(k-1)+c17·k+c18·(k-1)+c19·(k-1)+c20·(k-1)+c21·(k-1)+c22·(k-2)+c23·(k-1)+c24·(k-2)-c25·(k+2)-c26·2k+c27·2+c28+c29+c30·2+c31·2)n+(c1+c2+c3+c4+c5+c6+c7+c8+c12+c13-c15-c16-c18-c19-c20-c21-2·c22-c23-2·c24-2·c25+c27+c30+c31+c32)·1=O(n3).
The running time of the algorithm is the sum of running times for each statement executed. We can express the above equation in the form of an3+bn2+cn+d for constants a,b,c,d, and k that again depends on statement costs ci; it is thus a quadratic function of n, that is, n3.The concept of fault tolerance is also introduced in our algorithm. Fault tolerance [24] mechanism used in this approach is the modified version of fault tolerance [25, 26] mechanism of our previous work [22]. Two components present on all P2P grid nodes are notification generator and notification receiver in order to handle failure situation. These components either transfer or receive the three types of messages, the heartbeat message, the task completion message, and task failure message. If no message is received and periodic time expires, then an automatic task failure message is generated at the node. When failure message is generated then we reschedule subtasks at level l. Further, levels beyond l are again rescheduled, accordingly.In this manner, we achieve two goals by applying genetic algorithm separately for each level instead of applying on all levels at once. Firstly, we obtain better schedule. Also, fault tolerance approach will be applicable because of the unreliable nature of P2P grid nodes. Simulation results and discussion are given in the next section in support of PLBGSA algorithm.


## 4. Simulation Results and Discussion

Virtual network topology followed in this paper is shown in Figure1(b). N0 node is the origin node where DAG based task t is generated. Nodes set P{N0,N1,N2,N3} represents P2P grid nodes and the number of cores in P2P grid nodes is {2,3,4,3}, respectively. Window size for each node is {75.0,100.0,75.0,100.0}. Round trip time for P2P grid nodes is {0.1,0.4,0.2,0.4}. Computation capacity in million instructions per second for each P2P grid node is {1.2,1.0,0.9,1.4}.DAG based taskt consists of 10 subtasks {t0,t1,…,t9} and sizes of each subtask in million instructions are {8.0,7.0,4.0,3.0,6.0,4.0,2.0,4.0,3.0,6.0}, respectively. Size in Kb for each subtask is {800,700,400,300,600,400,200,350,350,550}. Origin node of all subtasks is the same (N0). Subtask level is also visible in Figure 1(a).Now, when random scheduling is used to schedule subtasks oft, finish time of t comes at 17.551 seconds as shown in Figure 6. Then we use genetic algorithm for scheduling DAG based task t, as mentioned in [14]. Results are obtained for task t in 12.019 seconds. Detailed scheduling of all subtasks is shown in Figure 7. When we use precedence level based genetic algorithm for decentralized scheduling of task t on P2P grid nodes, we get results in 8.973 seconds as shown in Figure 8.Figure 6
Detailed timewise schedule for all subtasks of DAG based taskt using random scheduling.Figure 7
Detailed timewise schedule for all subtasks of DAG based taskt using genetic algorithm for DAG scheduling in grid.Figure 8
Detailed timewise schedule for all subtasks of DAG based taskt using PLBGSA.After executing 10 times the proposed algorithm and the algorithm proposed in [14], schedules obtained by our techniques always come better as shown in Figure 9. Here, the number of generations was equal. In Figure 10, the algorithm of [14] is run with u,2u,5u, and 8u generations. However, with the increase in generation, schedules obtained in 10 runs have not much reduced in size. In Figure 11, comparison of schedules obtained by running 10 times algorithm proposed in [14] and our algorithm is shown. Reference [14] is having 8u number of generations and our algorithm is run only with u generations. However, schedules of previous algorithm were not as good as compared to our proposed algorithm. This fact is demonstrated in Figure 11.Figure 9
Ten runs of old GA and PLBGSA, withu generations.Figure 10
Ten runs of old GA algorithm withu,2u,5u, and 8u generations.Figure 11
Comparison of 10 runs of old GA algorithm with8u generations and PLBGSA with u generations.Figure12 shows that average finish time of our algorithm with only u generations is much better than the average finish time of [14], even when the number of generations is increased to 8u. Also, waiting time for subtasks at all levels is decreased with our algorithm as shown in Figure 13.Figure 12
Comparison of average finish time for taskt using old GA with u,2u,5u, and 8u generations and PLBGSA with u generations.Figure 13
Waiting time for each subtask oft with random scheduling, old GA, and PLBGSA.Node utilization for random scheduling is shown in Figure14. When we schedule subtasks using old GA proposed in [14], node 2 is sitting idle throughout all precedence levels. This is shown in Figure 15. Nodes are utilized more uniformly in PLBGSA as shown in Figure 16.Figure 14
Utilization of P2P nodes in random scheduling.Figure 15
Utilization of P2P nodes in old GA.Figure 16
Utilization of P2P nodes in PLBGSA.Ifa distinct P2P grid nodes are to be arranged along p subtasks of task t, where repetition of nodes is allowed, then the total number of ways of doing this scheduling is q; here q=ap. To find out the best schedule among all possible schedules is a very exhaustive task. Hence, using a genetic algorithm we generate g number of schedules out of q possible schedules. Finally, we select the fastest schedule among these g schedules. Now the probability of finding the best schedules in randomly selected g schedules is as follows:
(7)Pr.bestq=(Cg-1q-1×C11Cgq),wherecx2x1=x1!x2!(x1-x2)!.
On solving the right-hand side of (7), we get
(8)Pr.bestq=(gq).
Our approach first schedules tasks at level 2 then at level 3 and henceforth up to Lth level (second last level) of DAG based task t. Subtasks at level 2 are p1. Hence the total number of ways of doing scheduling is w1 (here w1=ap1). Now the probability of finding best schedules in randomly selected g schedules is as follows:
(9)Pr.bestw1=(Cg-1w1-1×C11Cgw1)=gw1.
Level 3 contains p2 subtasks; hence, the total number of ways of doing scheduling is w2 (here w2=ap2). Consider
(10)Pr.bestw2=(Cg-1w2-1×C11Cgw2)=gw2.
Similarly, at level L,
(11)Pr.bestwL-1=(Cg-1wL-1-1×C11CgwL-1)=gwL-1.
Now, since p1+p2⋯+pL-1<p, thereforew1×w2×⋯×wL-1=ap1×ap2×⋯×apL-1=ap1+p2+⋯+pL-1<q.From (8)–(11),
(12)Pr.bestq<Pr.bestw1,since(q>w1),Pr.bestq<Pr.bestw2,since(q>w2).
Similarly,
(13)Pr.bestq<Pr.bestwL-1,since(q>wL-1)Pr.bestq<(Pr.bestw1×Pr.bestw2×⋯×Pr.bestwL-1),since(q>w1×w2×⋯×wL-1).
Hence, the probability of getting better schedule using our approach is higher. Moreover, we store the results after scheduling all subtasks at any precedence level; we can incorporate fault tolerance in our approach. If we schedule using [14] and if some node fails, then again we have to schedule all subtasks present at all the levels shown in Figure 17. However, PLBGSA assigns genetic algorithm for subtasks of all levels separately; hence, we reschedule subtasks at a level where node failure happened and subtasks, beyond that level. This way we obtain results much faster as shown in Figure 18.Figure 17
Detailed time wise schedule for all subtasks of DAG based taskt using old GA when N3 fails at level 3 of task t. Here we reschedule using old GA.Figure 18
Detailed time wise schedule for all subtasks of DAG based taskt using PLBGSA when N3 fails at level 3 of task t. Here we reschedule using PLBGSA.


## 5. Conclusion and Future Scope of Work

We have applied genetic algorithm in every precedence level to schedule subtasks on P2P grid nodes. Moreover, PLBGSA is better and efficient than the algorithm proposed by Pop et al. [14]. Probability of finding good schedule is higher than the previous works. P2P grid resources are utilized more uniformly with PLBGSA. Further, fault detection and recovery mechanism is proposed in PLBGSA. This fault tolerance mechanism is yielding good results. We obtain near optimal schedule with a reduced number of generations in PLBGSA. In the future scope of work, we can apply other optimization heuristics using precedence level based scheduling for P2P grid. Also, we will incorporate task duplication technique before applying genetic scheduling at each precedence level in our future algorithm.



---

*Source: 749132-2013-12-18.xml*