Compositional parallel programming languages

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

CompositionalParallelProgrammingLanguagesIANFOSTERArgonneNationalLaboratoryAuthor’saddress:I.Foster,MathematicsandComputerScienceDivision,ArgonneNationalLaboratory,Argonne,IL60439.Permissiontomakedigital/hardcopyofallorpartofthismaterialwithoutfeeisgrantedprovidedthatthecopiesarenotmadeordistributedforprotorcommercialadvantage,theACMcopyright/servernotice,thetitleofthepublication,anditsdateappear,andnoticeisgiventhatcopyingisbypermissionoftheAssociationforComputingMachinery,Inc.(ACM).Tocopyotherwise,torepublish,topostonservers,ortoredistributetolistsrequirespriorspecicpermissionand/orafee.c1999ACM0164-0925/99/0100-0111$00.75ACMTransactionsonProgrammingLanguagesandSystems,Vol.8,No.1,January1999,Pages111{134.112IanFosterIntask-parallelprograms,diverseactivitiescantakeplaceconcurrently,andcommunicationandsynchronizationpatternsarecomplexandnoteasilypredictable.Previousworkhasidentiedcompositionalityasanimportantdesignprinciplefortask-parallelprograms.Inthispaper,wediscussalternativeapproachestotherealizationofthisprinciple,whichholdsthatpropertiesofprogramcomponentsshouldbepreservedwhenthosecomponentsarecomposedinparallelwithotherprogramcomponents.Wereviewtwoprogramminglanguages,StrandandProgramCompositionNotation,thatsupportcompositionalityviaasmallnumberofsimpleconcepts,namelymonotoneoperationsonsharedobjects,auniformaddressingmechanism,andparallelcomposition.Bothlanguageshavebeenusedextensivelyforlarge-scaleapplicationdevelopment,allowingustoprovideaninformedassessmentoftheirstrengthsandweaknesses.Weobservethatwhilecompositionalitysimpliesdevelopmentofcomplexapplications,theuseofspecializedlanguageshindersreuseofexistingcodeandtools,andthespecicationofdomaindecompositionstrategies.Thissuggestsanalternativeapproachbasedonsmallextensionstoexistingsequentiallanguages.Weconcludethepaperwithadiscussionoftwolanguagesthatrealizethisstrategy.CategoriesandSubjectDescriptors:D.3.2[ProgrammingLanguages]:LanguageClassica-tions|Concurrent,distributed,andparallellanguages;D.3.3[ProgrammingLanguages]:Lan-guageConstructsandFeatures|ConcurrentprogrammingstructuresGeneralTerms:LanguagesAdditionalKeyWordsandPhrases:Compositionality,ParallelLanguages,ParallelProgrammingACMTransactionsonProgrammingLanguagesandSystems,Vol.8,No.1,January1999.CompositionalParallelProgrammingLanguages1131.INTRODUCTIONParallelprogrammingiswidelyregardedasdicult:moredicultthansequentialprogramming,andperhaps(atleastthisisourview)moredicultthanitneedstobe.Inadditiontothenormalprogrammingconcerns,theparallelprogrammerhastodealwiththeaddedcomplexitybroughtaboutbymultiplethreadsofcontrol:managingtheircreationanddestruction,andorchestratingtheirinteractionsviasynchronizationandcommunication.Parallelprogramsmustalsomanagearichersetofresourcesthansequentialprograms,controlling,forexample,themappingandschedulingofcomputationontomultipleprocessors.Asinsequentialprogramming,complexityinprogramdevelopmentcanbeman-agedbyprovidingappropriateprogramminglanguageconstructs.Languagecon-structscanhelpbothbysupportingencapsulation,soastopreventunwantedin-teractionsbetweenprogramcomponents,andbyprovidinghigher-levelabstrac-tionsthatleverageprogrammereortbyallowingcompilerstohandlemundane,error-proneaspectsofparallelprogramimplementation.Forexample,thevariouslanguagesthathavebeendevelopedtosupportdata-parallelprogrammingachieveboththesegoals,albeitforarestrictedclassofprograms[Chapmanetal.1992;Foxetal.1990;Koelbeletal.1994].Data-parallelprogramsexploittheparallelisminherentinapplyingthesameoperationtoallormostelementsoflargedatastruc-ACMTransactionsonProgrammingLanguagesandSystems,Vol.8,No.1,January1999.114IanFostertures.Data-parallellanguagesavoidunwantedinteractionsbyenforcingsequentialsemantics.Theyusedatadistributionstatementstoprovideahigh-level,abstractsyntaxforspecifyingdataplacement,freeingtheprogrammerfromthelaborofpartitioningcomputationandtranslatingbetweenglobalandlocaladdresses.Ourresearchgoalistodeveloplanguageconstructsandassociatedtoolstosup-portthemoregeneralclassoftask-parallelapplications,inwhichmultipleunrelatedactivitiescantakeplaceconcurrently.Taskparallelismarisesintime-dependentproblemssuchasdiscrete-eventsimulation,inirregularproblemssuchasthoseinvolvingsparsematrices,andinmultidisciplinarysimulationscouplingmultiple,possiblydata-parallel,computations.Thechallengewhendevelopinglanguagecon-structsfortask-parallelprogrammingistoprovidethemodularityandabstractionneededforeaseofprogrammingwhilemaintainingthegeneralityneededtosupportarbitraryparallelcomputations.Compositionalityhasbeenproposedasadesignprinciplefortask-parallelpro-grams[ChandyandTaylor1991].Acompositionalprogrammingsystemisoneinwhichpropertiesofprogramcomponentsarepreservedwhenthosecomponentsarecomposedinparallelwithotherprogramcomponents.Thatis,thebehaviorofthewholeisalogicalcombinationofthebehavioroftheparts.Onepropertythatweoftenwanttobepreservedinthiswayisdeterminism,sothatprogramsconstructedACMTransactionsonProgrammingLanguagesandSystems,Vol.8,No.1,January1999.Compos

1 / 47
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功