Multi-Criteria Based Algorithm for Scheduling Divisible Load ...

4 downloads 17235 Views 399KB Size Report
Dec 15, 2013 - Cite this paper as: Ghanbari S., Othman M., Leong W.J., Bakar M.R.A. (2014) Multi-Criteria Based Algorithm for Scheduling Divisible Load.
Multi-Criteria Based Algorithm for Scheduling Divisible Load Shamsollah Ghanbari1 , Mohamed Othman ?2 ,Wah June Leong1 , and Mohd Rizam Abu Bakar1 1

Laboratory of Computational Science and Mathematical Physics Institute For Mathematical Research 2 Dept of Communication Tech and Network Faculty of Computer Science and Information Technology Universiti Putra Malaysia 43400 UPM Serdang, Selangor D.E., Malaysia [email protected],[email protected]

Abstract. Divisible load theory has become a popular area of research during the past two decades. Based on divisible load theory the computations and communications can be divided into some arbitrarily independent parts and each part can be processed independently by a processor. Existing divisible load scheduling algorithms do not consider any priority for allocating fraction of load. In some situation the fractions of load must be allocated based on some priorities. In this paper we propose a multi criteria divisible load scheduling algorithm. The proposed model considers several criteria with different priorities for allocating fractions of load to processors. Experimental result indicates the proposed algorithm can handle the priority of processors.

Keywords: Divisible load scheduling, priority, multi criteria, AHP.

1

Introduction

The first article about divisible load theory(DLT) was published in 1988[9]. Based on DLT, it is assumed that the computation can be partitioned into some arbitrary sizes, and each partition can be processed independently. In the past two decades, DLT has found a wide variety of applications in parallel processing area such as data intensive applications [7], data grid application [8] , image and vision processing[6] and so on. Ten important advantages of DLT has been listed in[10]. DLT was applied for various network topologies including chain, star, bus, tree [4], three-dimensional mesh[13]. Existing divisible load scheduling algorithms do not consider any priorities for allocating fractions of load to processors. In some situation the fractions of load must be allocated based on some priorities. For example when we have limitation on memory or buffers, existing divisible load scheduling algorithms may have NP ?

The author is also an associate researcher at Computational Science and Mathematical Physics Lab., Institute for Mathematical Research, UPM.

T. Herawan et al. (eds.), Proceedings of the First International Conference on Advanced Data and Information Engineering (DaEng-2013), Lecture Notes in Electrical Engineering 285, DOI: 10.1007/978-981-4585-18-7_61,  Springer Science+Business Media Singapore 2014

547

548

Shamsollah Ghanbari et al.

complexity[14]. In this case a multi criteria based algorithm would be very useful. This paper proposes a multi criteria divisible load scheduling algorithm. The proposed model considers several criteria with different priorities for allocating fractions of load. The proposed algorithm is based on analytical hierarchy process theory(AHP). AHP is a multi-criteria decision-making(MCDM)/ multiattribute decision-making (MADM) model which was developed by T.Saaty[2]. Over the past three decades, AHP has been found a number of applications in various fields[1,2,3]. AHP is a suitable method for solving priority-based problems such as scheduling with various attributes and alternatives as well[5]. The rest of this paper is organized as following sections: section two explains the basic concepts of divisible load scheduling, section three explains briefly hierarchy process theory, in section four we propose a new multi criteria based divisible load scheduling algorithm. In section five we analyze the proposed model. Finally in section six, we provide some experimental results for supporting the proposed model.

2

Divisible Load Scheduling

In general, DLT assumes that the computation and communication can be divided into some parts of arbitrary sizes and these parts can be independently processed in parallel(see Fig.1). DLT assumes that initially amount of load is

Fig. 1: Gantt chart-like timing diagrams for divisible load

held by the originator p0 . The originator does not do any computation. It only distributes α1 ,α2 ,...,αm fractions of load on worker processors p1 , p2 ,...,pm . Condition for optimal solution is that all processors stop processing at the same time[9]. The goal is to calculate α0 ,α1 ,...,αm ; where α0 + α1 + ... + αm =1. Eq.(1) shows a general timing equation(closed form) for DLT[4]. ( α0 w0 i=0 Ti (α) = (1) i Σj=1 zj αj + αi wi i = 1, 2, ..., m

Multi-Criteria Based Algorithm for Scheduling Divisible Load

3

549

Analytical Hierarchy Process

Analytical Hierarchy Process(AHP) is a multi-criteria(attribute) decision-making. A simple form of AHP is consisted of three levels including objective level, attributes level and alternatives level. Each level uses comparison matrixes for comparing the priorities. Assume that A = [aij ] is a comparison matrix. Each entry in matrix A is positive. In this case A is a square matrix (An×n ). There is only a vector of weights such as v=(v1 ,..., vn ) associated with any arbitrary comparison matrix such as A. Eq.(2) indicates relationship between the elements of comparison matrix A and its vector of weights v[1,2].  vi i 6= j vj aij = (2) i=j 1 An essential step in AHP is to calculate vector of weights(v). Based on [1,2,3,11] Vector of weights can be computed by solving Eq.(3). Av = λmax .v

(3)

Where λmax denotes the principal eigenvalue of A and v denotes the corresponding eigenvector. If A is absolutely consistent then λmax = n[2]. A metric for evaluating consistency of comparison matrix is named consistency rate(CR), it can be calculated by Eq.(5). According to[11,1,2] if CR < 0.1 then comparison matrix will be consistent. In Eq.(5), RI and CI denote the random index and consistency index respectively. CI can be calculated by Eq.(4) and RI can be obtained by using table 1[2]. Other methods for getting RI are available in [1,3,11]. λmax − n CI = (4) RI CI CR = (5) RI Number of rows 2 3 4 5 6 7 8 9 10 Random Index 0.00 0.58 0.90 1.12 1.24 1.32 1.41 1.45 1.49

Table 1: Random Index(RI) vs number of rows(columns) of matrix

4

Proposed Algorithm

Our proposed model consists of a scheduler, some processors, a multi criteria(attributes) decision maker and a matrix solver see Fig.2(a). A decision maker consists of three levels of priorities including divisible load level (objective level), criteria level (attribute level) and processors level (alternative level), see fig.2(b). In general the proposed model can be sketched as algorithm 1.

550

Shamsollah Ghanbari et al.

Fig. 2: (a)Framework of Proposed Model (b) Three Levels of a Decision Maker

Algorithm 1 A general multi-criteria based divisible load scheduling algorithm Input: ψ = {P1 ,P1 ,..,Pm } a set of processors(Tcp ,Tcm and for each processor wi ,zi );C={C1 ,C2 ,..,Cd } a set of criteria; Output:fraction of load α1 ,α2 ,...,αm Description: 1: let k←1 2: while k ≤ d do 3: Qck ← Comparison Mat(ψ,Ck ); 4: For Qck compute CR; Note:This parameter can be calculated by Eq.(5) 5: if CR < 0.1 then 6: let k← k+1 ELSE exit (the matrix is inconsistent.) 7: end if 8: end while 9: let R←Comparison Mat(C,Priority of criteria); 10: For R compute CR; Note:This parameter can be calculated by Eq.(5) 11: if NOT(CR < 0.1) then 12: exit (the matrix is inconsistent.) 13: end if 14: let ∆ ← nil ;let k←1 15: while k ≤ d do 16: solve Qck v (k) =λmax v (k) ; 17: attach(∆,v (k) ); 18: end while; Note: at the end of this loop we have ∆=[v (1) v (2) ...v (d) ] 19: solve RΛ=λmax Λ; 20: let P V D←∆.Λ; Note that P V D is an array with m elements 21: let i←1; 22: while i ≤ m do 23: assign processor Pi with ith element of P V D; 24: end while; 25: sort processors based on their P V D value; 26: allocate fraction of load to the sorted processors based on Eq.(1) and compute α1 ,α2 ,...,αm

Multi-Criteria Based Algorithm for Scheduling Divisible Load

551

Suppose that ψ ={p1 ,p2 ,...,pm } is a set of worker processors that requests load in a divisible load scheduling model. We assume that < ={c1 ,c2 ,...,cd } is a set of criteria for choosing a processor based on a decision maker such as root processor as well. In this algorithm Comparison M at() is a procedure that makes a comparison matrix. This procedure compares elements of a vector based on a particular criterion. Assume that the ratio of priority of pi to pj for getting a fraction of load is vvji . This procedure makes a square matrix with m rows and columns. In this case m is the number of worker processors. Steps 1-8 of algorithm 1 make d comparison matrixes which are Qc1 , Qc2 ,..., Qcd based on a criterion such as cg . Step 9 of algorithm 1 compares priorities of criteria. In this step each criterion will be compared with other criteria. Steps 4-7 and 10-13 of algorithm investigate the consistency of comparison matrixes. Consistency can be tested by using Eq.(5).The next step of algorithm is to compute vector of weights for produced matrixes. These processes have been done in steps 14-19 algorithm 1. Assume that v 1 ,v 2 ,...,v d are corresponding vector of weights of Qc1 ,Qc2 ,...,Qcd . In this case we can define ∆ as a priority matrix of processors. Matrix (∆) is shown in Eq.(6). Vector of weights for R is denoted by Λ in algorithm 1. It is calculated in step 19. ∆ = [v 1 v 2 ...v d ] (6) Step 20 calculates priorityvectorof distribution(P V D = ∆.Λ). Each element of P V D denotes the priority of the corresponding processor to get a fraction of load. Steps 22-24 assign the P V D values to the corresponding processors. Step 25 sorts the worker processors based on their P V D-values. Finally the load is allocated to the sorted processors in step 26.

5

Analysis of Proposed Algorithm

This section mainly discusses about two important issues related to the proposed algorithm including complexity and consistency. The complexity of proposed algorithm(denoted by Ωtotal ) can be calculated by Eq.(7). In Eq.(7), Ωpriority can be calculated as Eq.(8) which denotes the complexity of computing the priority vectors of comparison matrixes. Meanwhile, ΩDLT denotes the complexity of solving DLT. Moreover, Ωconsistency can be calculated as E.(9) which denotes the complexity of investigating consistency of matrixes. In this case according to[12] we assume that a matrix multiplication takes approximately m2.81 arithmetic operations (additions and multiplications). Where, m and d are the number processors and criteria respectively. Consistency indicates that each of the comparison matrixes has a logically reasonable value. Ωtotal = ΩDLT + Ωpriority + Ωconsistency

(7)

Ωpriority = d2.81 + d.m2.81

(8)

Consistency of proposed algorithm mainly depends on the decision makers. In other word, if the decision makers adjust elements of comparison matrix based

552

Shamsollah Ghanbari et al.

on the real priority of scheduling, they can make consistent comparison matrixes. Consistency can be calculated by Eq.(5) of comparison matrixes. We should solve Eq.(3) for calculating the consistency of comparison matrix. If any comparison matrixes are not consistent we should make a comparison matrix again. This inconsistency increases the complexity of algorithm. Therefore, Ωconsistency can be calculated by Eq.(9). In Eq.(9),k denotes the number of comparison matrixes that have been rejected(recomputed) because of inconsistency. Ωconsistency = k[max(d, m)]2.81

6

(9)

Experimental Results

In this section we have provided some experimental results. For this purpose we consider two separate cases, in the f irst case we assume four worker processors (p1 ,p2 ,p3 and p4 ). For each processor three criteria(c1 ,c2 ,c3 ) are considered. Table 2 indicates comparison matrixes based on criteria c1 ,c2 , c3 and their corresponding priority vectors(Qc1 ,Qc2 , Qc3 ). Comparison matrix for criteria based on decision maker is denoted by matrix C as well. In this case we investigate consistency of comparison of criteria matrix C.   1 35 C =  31 1 3  1 1 3 3 1

criteria Processors p1 p2 p3 p4

c1 p1 p2 p3 p4 1 14 4 61 4 1 4 14 1 1 1 51 4 4 6 4 5 1

Qc 1 0.17 0.29 0.05 0.49

c2 p1 p2 p3 p4 1 12 13 5 2 1 12 7 3 2 1 9 1 1 1 1 5 7 9

Qc 2 0.20 0.31 0.44 0.05

p1 p2 1 15 5 1 3 12 1 12

c3 p3 p4 1 12 2 2 1 3 1 1 3

Qc3 0.12 0.43 0.33 0.12

Table 2: comparison matrix and their corresponding priority vectors

By using Eq.(3) we have:λmax =3.039 ,CI = 3.039−3 =0.0195,CR = 0.0195 3 0.58 =0.033. Matrix C is consistent because CR