A Mobile Computing Architecture for Numerical Simulation
The domain of numerical simulation is a place where the parallelization of numerical code is common. The definition of a numerical context means the configuration of resources such as memory, processor load and communication graph, with an evolving f…
Authors: Cyril Dumont, Fabrice Mourlin
A M o bil e C o mp u ting Architectu re fo r Numerical S im ulat ion C yr i l D u mo n t Pari s 12 U ni ver si ty LACL Créteil, France dumont_cyril@yahoo.f r Fa br ic e M o u r lin Pari s 12 U ni ver si ty LACL Créteil, France f abrice.mourlin@w anadoo.f r Abstract The doma in of numeri cal simu lation is a place w her e the par al le liza tion of n umer ical code is common. T he defini tion of a numer ical cont e xt means the configura ti on of resources such as memory, processor load an d c ommun i cation grap h, w i th an evolving featur e : the resourc e s availab ility. A feature is often missing: the adaptab i lity. It is not predictab le and the adaptable as pect is ess ential. W ithou t calling into q uest ion thes e imp lemen tatio ns of thes e codes , w e creat e a n ada pti v e u se o f th es e im pl emen tat ions . Because the exe cution has to be driven by the availability of ma in resour ces, the c ompon ents of a num eric co mpu tat ion ha ve to r ea ct w hen th eir conte xt changes. Th i s pa per off e rs a ne w architecture, a mobile compu ting archi tecture, bas e d on mobile agents and Ja vaSpace. A t the end of this paper , w e apply our arch itecture to se veral case s t udies and obtain our first r e sults. 1. Introduction The domai n of nume rical applic atio n is a plac e wher e t echn i ca l fr am ework s ar e fr equ ent l y used . Th er e ar e u seful t o sol ve m an y p r a ct i cal pr oblem s , su ch a s eq u a t i on s ol v e r s , d a t a di str i bu ti on , an d l oa d obs er ver . B ut the n ume rical s imu latio ns hig h lig ht so f t w ar e enginee r ing proble ms, such as co de parallelizatio n , ter minat ion co ntrol , me mory manage me nt, e tc. T h e n, the simula tion p r og ramme r has to ch ange and re w r ite n um eri ca l code for ea ch exp eri m en t even i f in p ut d at a or comp u tin g r esour ces ar e s l i ght l y ch an ged. It seem s obvi ou s t h a t th i s pr ogr a m m in g ap pr oa ch i s e x p en sive and it i ntroduce s new bugs and new co st. A f eature is c lea r ly missi n g : adap tabil ity . An adap tive co mputatio n trie s to fulfill a s et o f go als in a co mple x, dy n amic env i ronme nt by se n sing a nd ac ting upo n its e n v iro n me nt. I n nume rica l sim ulatio n, t h e cu rr e n t co nstr ain ts d o not allow the r eal izat io n of suc h co mput ati o n . In t h is pape r we pr esent a n ew ar ch i t ectur e dedi ca t ed t o n um eri cal a da pta ti ve co mput ing. For n um er i cal a ppl i cat i o n , the in crea sed co mputatio nal p o we r of paralle l ha r dw are o ff ers a promisi n g way of excee di n g limit ati o n of r eso ur ces. How eve r , t h e pa ralle lizat ion o f nume rical c ode is us ually an e xpensiv e tas k, e spe cially whe n t his t ask is per form ed fr om an ex i st ing code. For in st an ce, n um eri ca l tech ni q ues such as Fin ite Di ff er en ce Tim e Doma in (FD T D) comp ut er pr ogr ams ar e u sed t o an al yze t h e el ect r om a gn eti c en vir on m ent in a l ot o f co ntexts . Imple me ntatio n s of this te chn ique al r eady exi st s uch a s GO RFF-V E [1 ]. The d evelop m en t of a new paralle l a dap tive versio n is u nbe lie v ab le but an adap tativ e us e of this i mpleme ntat io n is ac hiev able . This ki nd o f us e allow s two main f eatu res ; the firs t one is a be tter use of the co mput ing r eso urces of th e exi st in g mat er ial ar chit ect u r e ( lar g e n etwor k or gr i d of pr ocessor s). Th e secon d on e i s t o all ow th e r ep lay o f exp er im en t fr om a speci fi c p oin t , w h er e a wat ch p oin t is pla ced or wh er e an er r or occu r s . In thi s p a per , we pr es en t an ar ch it ect ur e w h er e mo bility is the key conc ept to adapt all t he da ta o f a nume r i cal e xperiment. T h ese a r e the input data, t he co mput ing task a n d t h e material r eso ur ces. The n ext sect i on exp l a in s our t ech n i cal ch oices a n d al so h ow th e mo bility is e xplo ited. T h e f ollo w in g pa rt de scrib es o ur soft war e ar chit ect ur e an d it s evolu t i on dur ing a co mput ing experime n t. Next, we discuss adv an tages an d l i mi t s of ou r a ppr oa ch , dra w up i t s ben ch mar k ar e b uilt and f i nally we d ep ict f uture d i rec tio ns o f ou r activ ity . 2. Intr oduction to a dynam ic network architectu re Trad itio n al n etw o r k arc hite c tu re is s tatic by natu r e. Netwo r k designers k n ow i n adva n ce which co m puter ha r dw are a n d so ftw ar e w ill pa rtic ip ate in a spec ific co mput ing and the n etwo r k infrastructure is b uilt in accor dan ce wi t h th i s concep t . For exa m ple, in the International Conference on Mobile Ubiquitous Computing, Systems, Services and Technologies 0-7695-2993-3/07 $25.00 © 2007 IEEE DOI 68 International Conference on Mobile Ubiquitous Computing, Systems, Services and Technologies 0-7695-2993-3/07 $25.00 © 2007 IEEE DOI 10.1109/UBICOMM.2007.40 68 Cl i en t/S er ver n etwor k a r ch it ect ur e, s peci fi c s er ver r esou r ces a r e desi gn ated t o be ser ved to cl i en t s on r e q u es t , wh i l e oth er soft wa r e un i t s ar e in di g en ou s on th e cl i en ts. In dynam i c n et wo r k ar ch i t ect ur e we d o n ot deci d e i n adva nce the s pe cific h ardw are a n d so f t w ar e t hat w ill pa r tic ipate in the s olut ion . B ec ause of the mu ltipl icity of sof t w a r e a nd har dw are availab l e on the n etw ork t hat co uld par tic ip ate i n the solu tion, it is adv antage ou s to de f er t he de c is io n u nt il t he so f tw a re o r ha rdw a re is actu ally requi red. The ide a is to h av e the so lut io n itse lf seek a n d r ecover on th e n et work th e com pon en t s an d r esou r ces i t r equir es . Sh ou l d th e sel ect ed c om pon en t s an d res our ces deg r a d e or fa i l dur in g execu t i on , th e solu t i on can rep la ce th em or /an d con tin u e t o opera t e. 2.1. A Mobi le Agent Framew ork So me pro grams c an b e made to r u n fas ter by di vi din g th em up int o sm al l er pi eces a n d runn in g th es e pi eces on mul t ipl e pr ocess or s. Fo r in s tanc e, a n ele ctro mag netic simu latio n ab o ut an el ect r i c cir cui t d evice t o be a n alyzed ( ca bl e pi g t a i l portio n ) starts w ith an input da ta set . T hi s o n e descr i bes an el ectr i c cir cuit d evice h avin g a m eta l cab inet, all data inpu t is d es cribe d in ter ms f amil iar to profe ssi onals in the f i eld but t h e size of this description is s o large th at it is no t pos sible t o read t h e w hole set an d t o com pu t e th e fi el d c omp on en t s on a sin gle co mput er. A co n c rete expe rime n t can us e a 14 Go data set for a 1.4 GHz case stu dy. Also the dat a set is pa r tit ioned w ith res pec t to the sy mme tries of th e dat a. It m ean s tha t th e cut str at eg y depen ds on th e sy mmetr ies whic h are e xp res s i n the da ta set [ 2] . Thes e prop ertie s c an co me fro m the u n de rly ing mes h if it is st ru ct ur ed or fr om the fu t ur e ta sk , if th at on e i s isotropic. Sev eral imp leme ntatio ns a lread y ex ist b ut f ew of th em hi de t echn i cal fea t ur es fr om their envir on m ent . Da t a exch an g e i s a l so a str on g con str ain t in a gen t co mmunity ; data ty p e has to be pres erve d f rom the sen d er to th e r eceiver s. Th ese m a in con str a int s h elped us s el ect a mobi l e a gen t fr am ewor k. 2.2. Th e Jin i Fram ework 2. 2. 1 . Ji n i i nt r od uc t i on. Ou r fr a m ew or k i s ba s ed on Java langua ge and Ji ni tec hn olo gy . The Jini netw orki n g sy s tem is a d ist ribu ted i n fras tructu re b uilt ar oun d th e J a va pr ogr a mm i n g la n g ua g e a n d enviro n m e n t. Jini is the na me f or a distribute d infrast r ucture co mput ing environme nt that can offe r “netw o r k plug a nd play ”. A dev ice or sof tw ar e se rvice li k e an agen t can be con n ected t o a n et wor k an d ann oun ce i t s pres en ce, an d cli ent s tha t wis h to us e su ch a se r v ice can the n loc ate it and c all i t to perf o rm task s [3]. The basic commu nica tio n mod el is bas ed o n the se mantic mo de l o f the J ava Re mote Me thod Inv o c atio n sy ste m, in w hic h ob je cts in o ne Jav a virtua l mac hine comm u ni ca t e with object s i n an oth er on e b y r ecei vi n g a p r oxy obj ect that imple me n ts t he sa me i nterf ace as the r emo te o bje ct. This co mmunica tio n mo de l is t h e cor e feat u r e for m ovin g a g ent s . The p r ox y o bj ect d ea l s w ith all co mmunica tion deta ils b etw ee n the tw o pr ocesse s. Th e pr oxy o b je ct ca n in tr od uce n ew co d e into the p roc e ss to w hic h it is mov ed . This is pos sib le bec ause J ava by te codes are po rtable, and i t is s a fe b ecause of the J av a env ir on ment’s b uilt-in v erif icatio n an d secur i t y. 2.2.2. Jini Ser vic es. T h e J i ni te c hnolo g y include s sev eral se rv ice s. B oth o f them inte r es t us p artic ularly : Ja vaS pa ces an d Tr an sa ct ion Ser vice. B uilding dis trib uted ap plic atio ns w ith co nve n tion al n etwork t ools usua lly ent a ils passin g messag es bet we en pr oce ss es or i n voki n g m e th ods on r e m ot e obj ect s. In Ja vaS pa ces a p pl i ca t i ons, in con tr a st, pro ce sses d on't c o mmunic ate di r ec tly , bu t in ste ad co ordina te thei r act ivitie s by exc h angi ng o bjec ts thr ough a s pa ce, or shar ed m em or y. A p r oces s ca n w r ite n ew obje cts into a s pac e, take o bje cts fro m a spa ce, or r ead (ma k e a local cop y of) obje ct s i n a spa ce. Wh en ta kin g or r ea din g object s, p r ocess es us e simp le m atc h ing , b ased o n the v alue s of fie lds, to find the obj ects th at matte r to the m. I f a m atc h in g o bje ct isn't f o und i mmed iate ly , th e n a p roc ess can w ait until on e a r r i ves . To m odi f y a n obj e ct , a pr oc es s m u s t ex plicitly remo v e it, u pdate it, and re inse rt it i nto the spa ce. S pa ces a r e object st or es wi t h sever al im p o r tan t prop ertie s that c ont r ibu te to mak ing J avaSp aces a po wer ful , exp r es si ve to ol . Spa ces ar e sh ar ed, pe r siste nt, tra n sac tio n ally s ec ure [4 ]. Out rigge r is the name of th e c ontrib uted Ja vaS pa ces( T M) ser vice fr om Su n Micr osystem s . Tr an sacti on s ar e a n ecessa r y p a r t of m a n y dis t ri but ed oper a t i ons . A seri es of oper a t i ons , eith er with in a si ng l e ser vice or span nin g mul tip l e ser vices, can be w r a pped i n a t ran sac t ion. M ahalo is t h e tra n saction manage r supplied by Sun as part of the Jini dis trib utio n. To make us e of tra n sac tio ns, f irst it is n ecess a r y to cr ea te a tr an sacti on m an a g er th a t can cr ea t e an d ma in ta in a tr an sa ct i on for ea ch cl i ent . Thi s co nce pt allo w s the u se r to ask f or a set o f re que sts whi ch are cl osel y r el at ed . I t in s ur es th a t th e wh ol e tra n s actio n is s atisf ied o r ca n ce lled. To loc ate a manage r , yo u use Jini' s loo kup and di sco ve r y. L ike all Jini service s, th e lo o kup servic e return s a proxy objec t to a tr an s acti on man ag er. Th e Jini tr an s a ct ion 69 69 interfac es s uppl y a service proto col neede d to coor d in at e a t wo-p h a se com mi t. 3. Mobi le com p uti ng architecture A wo r king space has to be organi zed , if we want to ach iev e a spec if ic missio n quic kly . A J a v aSp ace fo llow s this idea . In t he R eplic ated-W orke r patte rn o n Ja vaS pa ces [ 5 ], al s o kn own a s th e Mast er - Work er pa tt er n, a ma st er pr ocess cr eat es a coll ect i on o f ta s ks th at n eed t o be r un . Wor kers t a ke t a sk s fr om th e coll ect i on an d run th em, th e n han d over th e com p ut ed resu lt to the maste r. A s p ace is a na tura l c h an ne l fo r passing me ssages b etween master a n d wo r kers, due to th e d ecoup led p r ogr amm in g style i t encour ages. Typi ca l l y, th e r e ar e man y wo r k er s , and th ey a r e ide ntica l; h e n ce the te rm repl icate d . T his p atte rn nea tly pr ovides l oa d bal an cin g, wher eby ea ch w or ker con t ri but es wh at ever r esour ces i t can affor d. Th e wo rker on a f aste r mach i ne w ill exe cute mo re task s th an th e work er on a s l ower or ot h er wis e h ea vi l y loa d ed m a chin e; an d as lon g a s th e gran u lar ity of th e task s is su f fic iently fine , no w o rker w ill ho ld up t h e co mputatio n. Figu re 1. The Rep licated -Wo rker pat tern on JavaSpaces Th e open sour ce Java fr a m ewor k ComputeFarm [6] grew o ut of an implementatio n in JavaSpac es of th is pa tt er n . Bu t our a p pr oa ch of t hi s pa t t er n d i ffer s fr om ComputeF arm becau se t h e ta sk s d o n ot c on t a in th e requi red c o mputatio n. T he co mputatio n is o n a mo bile ag en t a par t fr om th e sp ace. In th e spa ce, t h er e ar e th e pa r ts o f the f ile a n d the sc h ed u ler , w h ic h is the m ai n comp on en t of th e com pu ta t i on. Ba se d on th e Rep l i ca t ed - W or k e r pa tt er n , our m obi l e comp ut in g ar c h i t ect ur e g oes fur th er th an th e Com pu t eFar m fram ew or k . The a d a pta bi li t y an d th e repl ay of a co mputatio n case is the h ea r t of o ur ar ch i tect ur e. In fact , our m obil e comp u t in g ar chi t ect ur e con si s t s of fou r ma in comp on ent s . All th e com p on en t s ar e on v ar iou s no de s of a n etw o rk. T h e li n k b etw een all t h e co mpo n ents is the Spac e . Ea ch com p ut er con ta inin g a comp on en t mu st r ea ch th e comp uter con t ain ing the Space . The Compu t ingMast e r i niti al izes the c ompu ta tio n cas e a n d fin i shes i t. It cr eat es th e p ar t s of t h e sou r ce f ile and c olle cts the f iles ge n e r ate d by the ComputingW orke r . The Computing Agent is the mob ile age nt t hat con t a in s th e code of t h e com pu ta t i o n ca se. An es sentia l pa rt of the co mputatio n is t h e Scheduler, w h ich schedu les task s for ComputingW orke r to fac ilitate multit aski ng. W h e n a co mpo n ent take s the Sc h e du l e r , the Sc he dule r is not av ailab le any mo r e. T h e c ompo ne nt mus t re w r ite it to make it av ailab le ag ain . T h at w ill av oid c onf licts a n d tw o ex ecu tio n s o f the s ame task . T h e s trate gy of cho ice s of tasks tak es part i n the se mantic of the Scheduler . T he Sch eduler w e w ill use f rom now o n attr ibute s the t asks to the Compu ti ngW orker i n or d er of task a rriv al. A n o the r imp leme ntatio n of the Scheduler is c omple tely poss ible : pr io ritie s into the tasks f or in st an ce. Finally the ComputingW orker tak e ta sks fr om t h e Scheduler and with th e Comp utingAgen t th ey ca n wo r k w ith the p arts o f the f ile on the Space . M o re ov e r, t he r esu l t of a s am e ta s k is id en ti ca l what ever th e ComputingW orker. T h e f ollowing pa rt desc ri be s in de tail t he co mpone nts i n f ou r s te ps. 3.1. In itializa t ion step Lik e t h e Tr ansaction Manag er and t he JavaSpac e , th e ComputingAg e nt is registe r ed w ith the Jini loo kup servic e: The loo kup service, w h ich is a Ji ni servic e, keeps tr ack of th e Jin i ser vices an d pr ovides pr oxies t o comm u ni ca t e with th e s ervi ces. This mo b ile age nt is sta r ted u p s ep ara tely from the o th er co mpo n e n ts o f the mo b ile co mputi n g ar ch i t ectur e. It can be u sed by a n oth er comp u tin g ca se wit h an oth er s our ce fi l e. Be for e s t ar tin g th e co mputatio n, it must be conf igured . A co nfigu ratio n f ile allo w s to define t he f o llow ing par ts o f the co mputatio n: - Th e wa y to cut th e sour ce fi l e a n d th e nu m ber of parts. - Th e n umber of ComputingWor ker used fo r th e be ginn in g of th e co m putation (t h is numb er can evo l ve with the passing o f the co mput atio n ). 70 70 - Th e a d dr ess of t h e C o m p u t i n gA ge nt. Thi s ad dr es s i s u sed b y t h e ComputingWor k er to g et the mob ile age nt. W it h o ur c o nf ig u ra tio n o n h a nd , w e c an b e gi n t he co mputatio n. Fi r s t of all, the s et up o f the Schedu le r in th e Space is es sential. O n th e b eginning it conta ins no ta s k bu t it i s th e cen tr al poi nt of th e ar c h it ect ur e. We sa i d th a t th e ComputingMas ter end s th e comp ut at i on. Fo r that it mus t lis ten to the Sche d u l e r . Wh en a ta sk ha s been execut ed , t h e ComputingMas ter wa n t s t o be i nfo rmed. T his co mpo nent is the Resu ltLi stene r. Now we a r e r ea dy to cu t th e s our ce fil e. T hi s par t of the co mputa tion depe nds on the c o mputatio n case (w e ha ve se en it in th e con fig u ra t i on s t ep) . The s ever al par ts cr ea t ed are copi ed i n a t emp orar y d i r ect or y. Exe cutio n of this p art is co mplete ly asy n chro n ou s w ith the rest of the computatio n proce ss. Fig. 2 desc r i be s th e tw o s teps of this init ializ atio n. Figu re 2. Ini tializat ion step for a computat ion case Th e Comp u tingM ast er cr eat es ot h er su b- comp on en t s su ch a s Fil eEntr yG enera tor, of wh i c h we w ill see the de sc r ip tio n i n the f o llow ing se ctio n. 3.2. Depl oy ment st ep In this sec t ion, w e explain how a c omputing co n t ext can b e i n i tially deploy ed. The f i r st part of th e deploy m ent is to warn th e ComputingW orke r abo ut the new co mputatio n. Fo r that a mo bile agent has its ow n r oad map , giv en by the Co mputi ngM aste r w ith t h e c onf igura tio n file , a nd con t a in s th e ad dr ess of t h e ComputingAg e nt. Th i s mobi l e a gen t mi gr at es on ea ch com pu t er of h i s r oa dm a p an d st art s a ComputingW orker with th e g ood co n figurati o n . Th e n, the Co mputingMas ter writes a Configurat i onEntry on th e Sp a ce an d ea ch n ew Co mputi ngW orke r will b e ab le to read t h e co nfigu ratio n. We fin ish ed th e pr evi ous se ct i on by th e c r ea t i o n of th e fi l es an d th e fact th a t it i s asynch r onou s. Th e FileE ntryG ener a tor is cr ea t ed and ca n n ow wai t f or new file in the te mpora ry directo ry . Th is a llow s, up o n r ecei p t of a fil e i n th i s d ir ect or y, t o st a r t th e proces s of th e g ener a ti on of F ileEn tr y an d new ComputingTask. A F ileEnt r y is ide n tifie d by an UU ID (U n ive r sally U n ique Ide n tifie r) us ed to ide n tify the same e n try in di ffer ent con t ex t s. A U UID i s ess en t ia ll y a 1 6 - b y t e (128-bit) n umbe r . I n its ca n onical hexa dec imal fo r m a UU ID may look like this: 550e8400-e29b -41d4-a716- 446655440000 . Th e n umbe r of th eo r etically p oss i ble UU IDs is th e r ef ore 2 128 = 256 16 or ab out 3.4 × 10 38 . This mea n s that 1 tril lion U U IDs have to b e c r eate d ev er y nano seco nd fo r 10 b illio n y ears to ex h aus t t he n um ber of UUID s. Wi t h r an d om UUIDs , th e ch an ce of t wo h a vin g th e sam e va l u e i s p oor . It al so con t a in s dat a of pa r t of th e sou r ce fi l e. Dat a ar e en coded Ba s e6 4 t o ser ia li z e d ata (m obil e on th e Space) . Bef or e wr i t ing th e en tr y on t h e Spa c e, th e Trans cati onMana ger crea t es a n ew tr an s a ction “A” tha t fo llow s th is pa rt o f the c o mputin g c ase dur i ng its v ar ious ste ps. T h is m anage r allo w s to c hec k if the t rans actio n is ope n . With th i s tr an sact i on “A ”, th e Fi le E nt ry is w ritte n on th e S pa ce a n d a ComputingTas k is added on t h e Scheduler. Th e n ew t a s k con t ain s th e tr an sacti on “A” and is in its f ir s t state : WAI T_FO R_C OMP U TING. (Fig. 3) Fig ure 3. Lif ecycle of a Comput ingTask 3.3. Exe cu tion st ep Fr om n ow on th e fi r st File E nt ry is w ritte n o n the Space, th e work of th e Computi ngW orker can beg in . 71 71 Le t us retu rn to creat ion o f the Com putin gW orker , o utlines quick ly on the prev io us ste p. Duri ng its cr ea ti on , th e wo r k er l oca t es t h e Comput i ngAgen t an d calls it. Like all Jini service s, t h e lo okup s ervice returns a p r oxy obj ect to th e agen t. A nd th is mob ile age n t (w ith its pro xy ) beco mes the inte llige n ce of the ComputingW orke r . T o b e i n f o r m e d o n n e w ComputingTask, it mus t liste n to the Schedul er . Ho we ver a n ew t a sk d o es n o t imp ly th at i t w ill b e re alize d by th is Compu t ingW orke r. The life cy cle of a Computi ngW orker i s str u ct ur ed in t o tw o s tates ( Fig . 4) . The c ont rol o f the activ ity of th e ComputingW orke r is es sen tial; all r es ource s of th e ComputingW orke r mu st be f or t h e pr og r ess t a s k an d leav e the o th ers tas ks f o r th e C o mputi n gWo rke r w ith unused reso ur ces . It can also a ccept t a sk on l y i f it i s i n WAIT_ FOR_COMPUTING st ate. Figu re 4. Lif ecycle of a Comput ingWorker Now le t us co nside r it is in t his s tate a nd is in for m ed th a t th e Sc heduler has a ne w ComputingTask in WAI T _ FOR_C OM PUTI NG s t a te. Th e work er ta k es th e Sc heduler ( 1 on Fig. 5) , th e n ew ComputingTask ( 2 on F i g. 5) and anal yses th i s task . No w it has a Transactio n tnx1 to read a Fi leE nt ry on th e Spac e ( 2 on Fig. 5) . With this entry , it decode s (Base64) data in a l oca l dir ect or y ( 3 on F i g. 5 ) and st ar t s the co mputatio n o n the lo cal f ile w ith the p r o xy of the ComputingA ge nt ( 4 on F i g. 5). We pu t th e Schedul er ba ck on th e Space so tha t oth er comp on en t s of ou r ar c h it ect ur e can l i st en t o it . Th e sta t e of th e ta sk is ON_ CO MPUTI NG ( Fi g. 3) . The n the f ile ge ner ated by the agen t is tra n sf ormed on a Resu ltEn tr y that h as the sa me p r op erties as FileE ntry : a generated U uid, data e n code d in Base64 ( 5 o n Fig. 5 ) . This re su lt is w ritte n on t he Spa c e wi th th e tr an sact i on tn x1 ( 6 on Fi g . 5) . Th e ComputingT a sk is now in COMPU T ED state ( 7 on Fig. 5). This sec tion explai n ed t he r ole of a unique ComputingW orke r , but th e pr in ci pl e of t h i s ar chi t ectur e is t h e mul tiplic ity of th is ki nd of worke r s. The f un dame ntal p oi n t is the po ssib ility to ad d and/o r remo ve an y wo rkers at any mome n t. Th is mak es adap tabil ity th e mai n f e atu re of o ur archi tec tu re. A ne w ComputingW orker ca n read the Schedu ler , a nd if it do es no t have a co nfigu ratio n fo r this c omp utatio n cas e, i t can r ea d th e Con figura tion En try on th e Space . Now it can take a ComputingTask a n d ex ecu te s it w ith th e ComputingAg e nt (t hanks to t h e n ew configuration). 3.4. F inal step A n ew Resu ltEntr y wa s th u s wr i tt en on th e Space. Now th e Re sultLi sten er , whi ch was cr ea t ed a t the init iali zatio n ste p , w ill be usef ul. Lik e the ComputingW orke r , t h e Resu ltLis tener must liste n to th e Schedu ler. Wh en a ComputingT ask is in COMPUTED st a te (Fi g. 3) , th e Resu ltLis tener is in for m ed an d can beg i n t o cr eat e th e resu l t fil e. The Re sultLi stene r ca n b egi n to take the f irst r es ults w h en th e ComputingMas ter is still cutt ing the so ur ce file . A c omp u tat i on case i s over wh en th e n umber o f t h e resu lt file s is equa l to t h e n umb er of the pa rt of th e sour ce fi l e. It i s n ecessa r y t o war n th e ComputingW orke r o n th is co mputa tion c ase. To do so , th e ComputingM aste r writ es a n ew en tr y on th e Spa ce. This e ntry is a StopEnt ry and all Comput i ngWor k er li s t en t o t h e a p pear an ce of t h is kin d of en tr y. Wh en a ComputingW orke r is inf ormed , it sto ps its activ ity an d is rea d y for a n ew compu t a ti on ca se. Fig ure 5. The comput ing process Th e com bin ati on of t wo el em en ts (tr an s a cti on s an d th e st a t e o f a Computi ngTask ) al low s to s tart agai n a co mputatio n c ase . If a trans actio n is abo rted, t h e task can st ar t again fr om it s l a st sta t e and th e 72 72 ComputingMas ter , wi th th e Trans actionManager , cr ea t es a n ew tr an sact i on for th i s ta sk. 4. Synthesis on our appr oach 4.1. Obse rva t ion o n ca se st u dy We ap p l ied our ar chit ect ur e to sever al ca se s t ud i es. Of cou r s e, we us ed i t for el em en t ar y num er ica l co mputatio n. 4.1 .1. Th e com put atio n of the n 'th d ecim al d igit o f vari ous transc e ndent al num be r s. F or in st an ce, we implement t h e formula fo r pi, discov er ed by Dav i d B ailey , Pe ter Bo rw ein , a n d Simo n Plo uff e [7 ]. The r easo n t h is pi f ormu la is s o inte r es ting is beca u se i t ca n be u sed t o ca lcu l a t e th e N -th di gi t of Pi (i n ba se 1 6 ) wi t h out ha vin g t o c a l cul at e a l l of th e previo us digits. A lso, the co mput ing t ask co n cept is cle arly ide ntifie d and the da ta se t is li ght . A c ompu ting task is the c omputa tion o f a pa rticul ar c omp onent o f the f o r mula. The cut f ile str ategy is easy to imp leme nt. It de pends o n the nu mb er of dec imal dig its , w h ich is usef ul to have by th e end o f the e xper ime n t. Mor eo ver , on e can even d o th e ca l cula ti on in a tim e th at i s es sen t ia ll y li n ear in N, w i th mem or y requi r e ments only lo garit hmic i n N . Th is is fa r be tter th an pr evi ous a l g or ith m s for fin din g th e N -th dig it of Pi, whic h r equi r ed keeping track of a ll th e prev ious digits. 4.1.2. A m atrix co mputatio n. A ca se stud y for co mputi n g t he C h ole sky deco mpos ition of a positiv e de finite mat rix i n to a p rodu ct o f a lowe r and a n up per tria gonal mat r ix h a v ing a di me n sio n o f L (10 i n o ur cas e) i n a mul t i-ch an n el pr oced ur e. In that ca se s t ud y, the data se t is mo r e imp o r ta n t tha n b efo r e. A ll the matrixes a re def i n ed in an i nput file a nd the cut st ra t eg y i sola t es ea ch su bset of m a tr i x [8]. The computa tio n is pe rfo r med i n our pa rallel ad a pt i ve ar chit ect u r e com pr i sin g P process or modu l es (1 0 in our ca s e); ea ch pr ocess or m od ul e c om pu t es a new Chole sky deco mpo sitio n fro m the e ntry f ile. This de compo sitio n is div ide d i nto sev eral co mputin g t asks and be cause t h e c omputing tasks are not i ndependent, the sch edu ling task wh ich belon gs t o th e Javasp ace play s the r ole o f "chie f ma nage r" . For ea ch matr i x, th e sch edu lin g con si s t s in th e co mputatio n o f a set of ro ws of the low er triago nal matrix wit h R=L/P, w her eby a given r ow j is assign ed to a sp eci fic c om p ut in g ta sk of th e Java sp a ce. Th e en tr i es o f th e lower tr ia g ona l matr ix ar e obtain ed b y ano th e r co mput ing tas k w hic h co n tai n s an ite ratio n pr ocess o ver th e colum n s i, with i=1, .. ., L, wh ereb y in each it er at i on st ep each pr ocess or m odu l e c omp ut es t h e en tries of colu mn i for it s assi gn ed row s R in a dist in ct co mputi n g task ; w ith be ginni n g a n ite r atio n ste p fo r co mputi n g the e ntrie s o f co lumn i with i ≤ L, th e pr ocessor mod ul e t o whi ch th e com pu t at i on of r ow numb er i is ass ig n ed to sto res its v al ue s o f row i f o r acces s b y t h e oth er pr ocessor modu l es. This co m puting case b r in gs more f eatur es abo ut t h e con t ext wh er e our a p pr oach i s mor e s ui t a bl e. The defi n i ti on of ea ch k in d of com p ut in g ta sk s i s es sen tia l an d esp ecia l l y th e r ela ti on betw een a l l th e comp ut in g tasks . T his c omp uting t ask de ve lop me nt invo lv es th e cu t file strate gy . This a llo w s mo r e adap t iv e e xecu tions r e g ar d in g th e ava i l a bl e pr oc es s or s. 4.2. Advan tages and lim its In or der t o bui ld our ar ch i t ectur e, th e Jin i f r amew ork m akes it e asy to create dy namically netw o rked co mpo n en ts, ap p licatio ns , a nd s e rvic es . Ji n i also allo w s an env i ro n me n t i n whic h it is e asy to crea te coll a b or a ti on th r ou gh the J ini C ommun ity. Ji n i moves the in pu t da ta se t as ex ecu table task entity of a Ja vaS pa ce ex ecut a bl es. I t m ean s of a Ja va obje ct over a netwo r k. T h e language i s also k n ow n for its desig n f lexib ility . One o f J in i's uniq ue qua litie s is t hat it enab les ne tw ork s elf -heal ing a n d se lf- co nfigu ratio n, imp r ov ing f ault to lera n ce . U sing Ji ni, n etw o rks e a sily ad ju st t o chan ges in th e co mp u t in g envi r o n men t. Our exp eri en ce hi gh li gh ts th e i m p ort an ce o f t wo mai n fe atures : the de finitio n of ComputingAgent an d the de co mposition o f the input data. B oth f eatu r es inv olv e ad aptab ility of o ur sy ste m. I n a mo r e c onc rete con t ext , Comput ingAgent a nd input data already exist o r are g iv en by acad emic spec ialists . Du r ing a n execu t i on , th e Compu t ingWork e r r ecei ves ComputingA ge nt as a mo b ile ag en t whic h co mes to realize its act i vity ove r an input data. O ur arc hitectu re allo ws to prov ide a de comp ositio n of the w h o le input data set as File E ntr y (Fi g. 5) . This de co mpos ition is a key fe atur e to ada pt the f low of activ ities to the ava i la bl e r esou r ce ( Computi ngWorker i n F ig . 5) . 4. 3. Future d ire ct io n Our f irst r es ults v alid ate o ur app r oac h and the ad a pt i ve ar c h it ect u r e we pr esen t ed ea r li er in th i s docum en t. Th e four step exp eri m en t star ts wi th init ializa tion ste p w h ic h de cide s a lo t of th e c onst r ai n ts ov er all t h e e xec ution. We wo r k o n po ss ib ilities of en lar ging th e ch oices su ch a s t h e nu m ber of c om pu t in g wor k er s. Becaus e n e w w or k er s can be ad ded i n t o a n exp er im en t con t ext, th ese n ew r esour ces ca n be u sed . 73 73 Ano ther di rectio n is abo ut c omparis on b etw een ou r ap pr oa ch an d exi stin g para ll el al g ori th m s. We wan t t o use E x ecu ti on T im e M eas ur em ent fr am ewor k su ch a s JE T M [ 9]. Our obj ect i ve i s t o cr ea t e ben ch mar k bet ween MPI im pl em en ta ti on of par all el al g o r i thm an d sa m e im plem en t at i o n over our ar chit ect ur e. 5. Conclusion This paper is abo ut a n ew te chnique of reso l ution of lin ear sy st ems i n Ja va. Ja va, with Jin i, can be use to deve lop distrib uted infrast r ucture w i th JavaSpace an d tra n s actio ns . Th at w h y we use this c o uple to mak e o ur ar ch i tect ur e. We stres s t h e r o le o f mobile agents f or t he ComputingA ge nt a n d als o the r o le o f th e data de compo sitio n w hich is clo sely relate d to the co mput ing r eso ur ce. Our f irst r esu lts val idate ou r des ign a n d the y drive us to a mo r e mob ile app r oac h w h e r e t h e d ec omp os itio n w ill occ ur mo r e t h an o nce . Als o, t his c o mputing ar ch i t ectur e al l ows t o us e exi st i n g n umer i ca l code a s ext er n al ComputingAge nt . In ou r exa m pl es , on l y on Comp utingA gent, with a n um eri ca l code, is us ed. In th e ca se of a seq uen tia l co mputatio n , we must be able to make many comp ut a t i ons on e a fter th e ot h er . That wh y, t h e n ext evol ut i on of our ar chi t ect ur e i s t h e comp lex i t y in cr ease of o ur Scheduler: wit h a n ew d e fi n i ti on of a ComputingTas k . A Co mputi ngTas k w ill co n tai n na me of the C o m p ut i n gA gen t to c al l. 6. Refer enc es [ 1] Title: A theo ret ic al ana ly sis o f the ele c trom agn et ic env ironment of the A S330 super P uma hel i co pter ext e rnal and in terna l co uplin g A utho rs: Flo urens , F.; M o rel, T .; Ga uth ier, D.; S eraf in, D . A ff iliatio n: Centre d ' Etud es de Grama t (Franc e). Publ icat ion: I n NA S A. Kennedy Spac e Center , Th e 1 991 I nternat ional A erospace and G round Co nf erenc e on Lig htnin g and St atic Elec tric ity , Vo lum e 2 12 p (SEE N 91-32693 2 4-47) , 0 8/1991 [2] Costa et al.: On the c om put atio n of electro magnetic fie l d c ompo nen ts f rom a transm iss ion line: the o r y and ap plica tio n; I EEE S y mp. on Elect . Com pat. ; pp. 651-656, A ug. 1990 . [3] J . Ne wma r ch, F oundat i ons of Jini 2 Program ming , 2 006 [4] E. Freeman and S. Hupf er, “ Make ro om for Jav aSpaces ”, JavaW orld.com , 2 0 th No vember 19 99 [5] E. Freem an, S. Hu pfer and K. A rnold, “ Java Space s P rinciples , P atte rns, and P ractice” , No vem ber 199 9 [6] T. Wh it e, “How t o Buil d a Compute Far m” , Ja va.ne t , 21th A pr il 2005 [7] Ba i l ey, D. H. ; Borw ei n , J. M. ; Ca lkin , N. J. ; Girge ns ohn, R.; L uke, D. R.; and Mo ll, V . H. Expe ri me nt al Mathema tics in Ac ti on. Na t ick, MA : A. K. Pete rs, pp. 3 1-33 and 22 2, 2006. [8] L. Pan, L . F. Bic, M.B. Di llenco urt, J.J. H us ey nov, and M.K . L ai “D is tr ibu ted Pa rall el C om putin g us ing Na v igatio nal P ro gram ming : Orc hestra ting Co mp utatio ns A r ound Data proc eeding”, (373) Para llel and D istribu ted Comput i ng an d Sys tems , 2002 [ 9] I ntelliJ I DEA , Jav a Ex ecu tion T im e Meas u reme nt L ibrary , ht tp: //sou rcef org e.ne t/pro jec ts/ jetm / 74 74
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment