您好,欢迎访问三七文档
CompositionalParallelProgrammingLanguagesIANFOSTERArgonneNationalLaboratoryAuthor’saddress:I.Foster,MathematicsandComputerScienceDivision,ArgonneNationalLaboratory,Argonne,IL60439.Permissiontomakedigital/hardcopyofallorpartofthismaterialwithoutfeeisgrantedprovidedthatthecopiesarenotmadeordistributedforpro torcommercialadvantage,theACMcopyright/servernotice,thetitleofthepublication,anditsdateappear,andnoticeisgiventhatcopyingisbypermissionoftheAssociationforComputingMachinery,Inc.(ACM).Tocopyotherwise,torepublish,topostonservers,ortoredistributetolistsrequirespriorspeci cpermissionand/orafee.c 1999ACM0164-0925/99/0100-0111$00.75ACMTransactionsonProgrammingLanguagesandSystems,Vol.8,No.1,January1999,Pages111{134.112 IanFosterIntask-parallelprograms,diverseactivitiescantakeplaceconcurrently,andcommunicationandsynchronizationpatternsarecomplexandnoteasilypredictable.Previousworkhasidenti edcompositionalityasanimportantdesignprinciplefortask-parallelprograms.Inthispaper,wediscussalternativeapproachestotherealizationofthisprinciple,whichholdsthatpropertiesofprogramcomponentsshouldbepreservedwhenthosecomponentsarecomposedinparallelwithotherprogramcomponents.Wereviewtwoprogramminglanguages,StrandandProgramCompositionNotation,thatsupportcompositionalityviaasmallnumberofsimpleconcepts,namelymonotoneoperationsonsharedobjects,auniformaddressingmechanism,andparallelcomposition.Bothlanguageshavebeenusedextensivelyforlarge-scaleapplicationdevelopment,allowingustoprovideaninformedassessmentoftheirstrengthsandweaknesses.Weobservethatwhilecompositionalitysimpli esdevelopmentofcomplexapplications,theuseofspecializedlanguageshindersreuseofexistingcodeandtools,andthespeci cationofdomaindecompositionstrategies.Thissuggestsanalternativeapproachbasedonsmallextensionstoexistingsequentiallanguages.Weconcludethepaperwithadiscussionoftwolanguagesthatrealizethisstrategy.CategoriesandSubjectDescriptors:D.3.2[ProgrammingLanguages]:LanguageClassi ca-tions|Concurrent,distributed,andparallellanguages;D.3.3[ProgrammingLanguages]:Lan-guageConstructsandFeatures|ConcurrentprogrammingstructuresGeneralTerms:LanguagesAdditionalKeyWordsandPhrases:Compositionality,ParallelLanguages,ParallelProgrammingACMTransactionsonProgrammingLanguagesandSystems,Vol.8,No.1,January1999.CompositionalParallelProgrammingLanguages 1131.INTRODUCTIONParallelprogrammingiswidelyregardedasdi cult:moredi cultthansequentialprogramming,andperhaps(atleastthisisourview)moredi cultthanitneedstobe.Inadditiontothenormalprogrammingconcerns,theparallelprogrammerhastodealwiththeaddedcomplexitybroughtaboutbymultiplethreadsofcontrol:managingtheircreationanddestruction,andorchestratingtheirinteractionsviasynchronizationandcommunication.Parallelprogramsmustalsomanagearichersetofresourcesthansequentialprograms,controlling,forexample,themappingandschedulingofcomputationontomultipleprocessors.Asinsequentialprogramming,complexityinprogramdevelopmentcanbeman-agedbyprovidingappropriateprogramminglanguageconstructs.Languagecon-structscanhelpbothbysupportingencapsulation,soastopreventunwantedin-teractionsbetweenprogramcomponents,andbyprovidinghigher-levelabstrac-tionsthatleverageprogrammere ortbyallowingcompilerstohandlemundane,error-proneaspectsofparallelprogramimplementation.Forexample,thevariouslanguagesthathavebeendevelopedtosupportdata-parallelprogrammingachieveboththesegoals,albeitforarestrictedclassofprograms[Chapmanetal.1992;Foxetal.1990;Koelbeletal.1994].Data-parallelprogramsexploittheparallelisminherentinapplyingthesameoperationtoallormostelementsoflargedatastruc-ACMTransactionsonProgrammingLanguagesandSystems,Vol.8,No.1,January1999.114 IanFostertures.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
本文标题:Compositional parallel programming languages
链接地址:https://www.777doc.com/doc-5524097 .html