2 2009 2 ACTA ELECTRONICA SINICA Vol. 37 No. 2 Feb. 2009,,, (, 210003) : NP2.,,, ( Grid Resource Allocation Algorithm based on Parallel GEP,GRA2PGEP).,., GRA2PGEP GEP GA. : ; ; ; : TP301 : A : 037222112 (2009) 0220272206 Grid Re source Allocation Algorithm Ba sed on Parallel Gene Expre ssio n Pro gra mming DENG Song,WANG Ru2chuan,ZHANG Yu,ZHANGJian2feng ( School of Computer, Nanjing University of Posts and Telecommunications, Nanjing, Jiangsu 210003, China) Abstract : Resource allocation of grid is part of optimization and NP2hard problem. In order to optimize resource allocation of grid,in the present research,it proposes a model of grid resource allocation, analyzes three different situations of the number of resources and tasks in detail,and then puts forward on a new algorithm which is called Grid Resource Allocation Algorithm based on Parallel GEP( GRA2PGEP). It adopts a nonlinear code based on resources and tasks and inversion operation, meanwhile, a coarse2 grained model is applied to design the GRA2PGEP algorithm. By simulation experiment, it is showed that optimization successful rate,average convergent generation and consumptive time of GRA2PGEP have the advantage over traditional GEP and GA. 1 Key words : gene expression programming ; grid ; resource allocation ; coarse2grained model, [1], :,,.,.,,NP -. NP,,,., [25] ( Gene Expression Programming,GEP) :2008201223 ; :2008203226 NP [6],, GEP,, GEP ( Grid Resource Alloca2 tion Algorithm based on Parallel GEP, GRA2PGEP)., GRA2PGEP,,,. : (1),,K (Job Cluster based upon K - means,jc2 Kmeans) ; (2),2 ( Grid Resource Selection based on Time2Cost Optimization,GRS2TCO) ; (3) :(No. 60573141,60773041) ; 863 (No. 2006AA01Z201,No. 2006AA01Z219,No. 2006AA01Z439, No. 2007AA01Z404,No. 2007AA01Z478) ;(No. BG2006001) ;(2007 127) ; (No. 9140C1105040805) ; (No1CX08B2085Z,CX08B2086Z)
2 : 273 GEP ( Grid Resource Alloca2 tion Algorithm based on Parallel GEP,GRA2PGEP) ; (4), GEP GA, GRA2 PGEP,. 2 GEP 211,,.,,,,. [710] ( Gene Expression Programming, GEP),. GEP,,. 212 n, m, n m, m n,., -. 1 2 ( Time2Cost Matrix) n, m, i j c ij, i [1, m ], j [1, n ], c ij C m n = C m n -. c 11 c 1 n ω, c m1 c mn, : (1) n = m,, ; (2) n > m,, ; (3) n < m,,. [11]., x ij = 1, i j 0, : m min c ij x ij (1) i = 1 n : j = 1 (1) n = m, : n x ij = 1, i = 1,2,, n j = 1 n x ij = 1, j = 1,2,, n i = 1 x ij = 0 1, j = 1,2,, n (2) i, j.. n = m,: 1 2 C m n () ( ), C m n = ( c ij),,. C m n 2 C m n = ( c ij) ( ) ( ), (2) x ij,c m n.. X,(1) F 1 ( X) = C m n X, F 2 ( X) = C m nx, U n n 2 C m n, V n n 2 C m n. C n n = C n n - U n n - V n n, F 1 ( X) - F 2 ( X) = C n n - X - C n n X = ( C n n - V n n ) X = C, C.. C n n ) X = ( U n n + (2) n > m,,,,. GEP, K (Job Cluster based upon K - means,jc2kmeans).,k,,,
274 2009 z2,. 2 n2( n2metadata Se2 quence of Job) x 1j, x 2j,, x nj j n,x j = ( x 1j, x 2j,, x nj ) j n2. 1 BP, BP ID( ),BP,: In, Hide, Out, Precision, Num BP URL. X = ( ID, In, Hide,Out, Preci2 sion,num,url) BP 2. K,, z2. 3 z2 ( z2division Value of Job) s j = 1 n ( x 1j - m j + x 2j - m j + + x nj - m j ) j, x ij, i [1, n ]j, m j = ( x 1j, x 2j,, x nj ) / n j, z ij = x ij - m j s j, i [1, n]j z2. 1 : 1 K ( Job Cluster based upon K - means,jc2kmeans) Input :JobQuenue ( J 1, J 2,, J n ) ; Output :ClusterJobQueue ( J 1, J 2,, J m ) ; Algorithm JC2Kmeans(int m,string[ ]JobQueue ( J 1, J 2,, J n ) ) ; Begin{ m ; JobQueue ( J 1, J 2,, J n ) m ;,z2, z2z2,, z2 ; ;,.,,3 ; return ClusterJobQueue ( J 1, J 2,, J m ) ;} End K. (3) n < m,, 2,m, n n,. 2 ( Grid Resource Selection based on Time2Cost Optimization, GRS2TCO). 2 : 2 2( Grid Resource Selection based on Time2Cost Optimization, GRS2TCO) Input : 2 C m n = Output :RList ; c 11 Algorithm GRS2TCO(double[ ] C m n ) Begin { c 1 n ω ; c m1 c mn 1. Input ( C m n ) ;/ / 2 ; 2. i = 1,List RList ; 3. while ( i < = n) { 4. for (int j = 1 ; j < = m ; j + + ) { 5. min( C ij ) j ;} 6. RList. add ( j) ;/ / j RList ; 7. C m n - > C m n ;/ / i j ; 8. C m n = C m n ;/ / C m n C m n ; 9. i = i + 1 ;} 10. return RList ;/ / ;} 2 C m n,,. O ( n 3 m). m 2,,. 213 GEP [2],. GEP,, GEP,. (1) n = m n < m n < m, 2 m n n., GEP. GEP. 2 5,5, GEP 5 5, :
2 : 275 0 1 2 3 4 0 1 2 3 4 3 5 2 4 1 E C B A D GEP, Head = {1,2,3,4,5}, 5, Tail = {A,B,C,D, E}, 5. GEP. 1. 1, 3 E, 5 C,. (2) n > m n > m, 1 n m, T = { 1,2,3,4,5,6,}, R = { A,B,C,D,E}, JC2Kmeans 6 5, T = { 1,2,3,4,5,},. GEP : 0 1 2 3 4 0 1 2 3 4 4 1 3 2 5 D B C A E T R 2.,,. 214 GEP GEP GEP, GEP. [12].. GEP,, GEP,2,. GEP n m,, [2 ],. GEP 3. 3 GEP ( Grid Resource Allocation Algorithm based on Parallel GEP, GRA2 PGEP) Input :2 C m n ; Output : Best2ResTaskString; Begin { 1. m n 2 C m n ; 2. if ( n < m) { 3. GRS2TCO(double[ ] C m n ) ;/ / 2m n ;} 4. else ( n > m) { 5. JC2Kmeans(int m,string[ ] JobQueue ( J 1, J 2,, J n ) ) ;/ / n K m ;} 6. Initial Population S ;/ / ; 7. MappingSubPopulation ( S, n) ;/ / S n, n ; 8. While ( fitness < MaxFitness) or ( gen < MaxGen) { / / n ; 9. fitness ; 10. ; 11. if (epoch mod t = 0) { / / ; 12. select emigrants ;/ / ;} 13. Inversion ( MGF, point1, point2, rate) ;/ / MGF, point1 point2 ; 14. gen = gen + 1 ;} 15. return Best2ResTaskString;/ / ;} GRA2PGEP,,. 3 GRA2PGEP, 4. Windows2000 + 512M + P41186, Java. 1 2 C m n,,n = m = 10, GRA2PGEP GA GEP Best2ResTaskString, 100,3 1. 1,, GRA2PGEP GEP 1,
276 2009 GA 3, GEP 10 %,GA 21 %. 1,n m 12 30,1,, 3. 1 GA 230 76. 45 % GEP 120 87. 43 % GRA2PGEP 70 97. 23 % 3, n ( m), GRA2 PGEP GEP 9 %,GA 19 %. n < m,, GRS2TCO,n = m. n = 4, m = 5, 2 C 5 4 = 1 11 2 9 2 3 1 1 5 2 4 2 7 9 5 1 9 1 7 3,4 2 2. 4, 2,,. 4 a b,2,. 2 n > m, 1, z2, GRA2 PGEP. 2, n m, GRA2 PGEP GA. 5 12 40 95 100 150 2 1 2 3 4 GRA2PGEP 7 9 5 7 () 0. 23 0. 23 0. 24 0. 22 GEP GA GRA2PGEP GEP GA GRA2PGEP GEP GA 13 14 11 12 () 1. 3 1. 2 1. 5 1. 2 20 19 22 20 () 2. 3 2. 1 2. 2 2. 1 37 44 43 51 () 5. 2 5. 4 5. 6 5. 5 88 92 99 102 () 78. 1 77. 3 79. 2 77. 1 113 116 115 123 () 111. 3 114. 2 113. 1 114. 4 71 73 78 74 () 12. 2 12. 4 12. 2 12. 9 243 249 245 244 () 192. 1 194. 4 193. 2 193. 6 421 429 434 443 () 255. 2 255. 3 255. 4 255. 3 2,, GRA2 PGEP GEP 2,GA 6 ; GRA2PGEP GEP 16,GA 21., n m, GRA2PGEP. 4,,,.
2 : 277,,( GEP), GEP ( Grid Re2 source Allocation Algorithm based on Parallel GEP, GRA2 PGEP),,, GRA2PGEP GEP GA,,. : [1] Foster I, Kesselman C. The Grid :Blueprint for a New Comput2 ing Infrastructure [ M ]. San Francisco : Morgan Kaufmann, 1999. [ 2 ] Candida Ferreira. Gene Expression Programming : A new adap2 tive algorithm for solving problems [ J ]. Complex Systems, 2001,13 (2) :87-129. [ 3 ] Ferreira C. Gene expression programming in problem solving [ A ]. Invited Turorial of the 6th Online World Conference on Soft Computing in Industrial Applications [ C ]. Berlin : Springer,2001,9 :10-24. [ 4 ] Candida Ferreira. Automatically defined functions in Gene ex2 pression programming[j ]. Genetic Systems Programming : The2 ory and Experiences, Studies in Computational Intelligence, 2006,13 :21-56. [ 5 ] Candida Ferreira. Function finding and the creation of numerical constants in Gene expression programming[ A ]. The 7th Online World Conference on Soft Computing in Industrial Applications [ C ]. England :Springer,2002. [6 ] Fernandez2Baca D. Allocating Modules to Processors in a Dis2 tributed System [J ]. IEEE Transactions on Software Engineer2 ing,1989,15a (11) :1427-1436. [7 ],,. [J ].. 2005,33 (11) :2017-2021. Jiang Si2wei, Cai Zhi2hua, Zeng Dan, et al. Parallel Gene ex2 pression programming algorithm based on simulated annealing2 method [ J ]. Acta Electronica Sinica, 2005, 33 ( 11) : 2017-2021. (in Chinese) [ 8 ] Chang2an Yuan, Chang2jie Tang, et al. Intelligent function model discovery system based upon Gene expression program2 ming [ J ]. J ournal of Computational Information Systems, 2006,2 (4) :1299-130. [ 9 ] Zuo Jie, Tang Changjie, Zhang Tianqing. Mining predicate as2 sociation rule by gene expression programming[ A ]. Proc of the 3rd Int l Conf for Web Information Age 2002 ( WAIM02). LNCS 2419[ C ]. Berlin :Springer2Verlag,2002. 92-103. [10 ] Zuo Jie, Tang Changjie,Li Chuan, et al. Time Series Predic2 tion based on Gene Expression Programming[ A ]. Proc of the 5th Int l Conf for Web Information Age 2004 ( WAIM04). LNCS 3129[ C ]. Berlin :Springer2Verlag,2004. 55-64. [11 ],,,. [ M ]. :,2001. [12 ],,. [ M ]. : :,1996.,1980,,. E2mail :dsylc2006 @yahoo. com. cn,1943,, E2mail :wangrc @njupt. edu. cn,1978,,.,1983,,.