下载
加入VIP
  • 专属下载券
  • 上传内容扩展
  • 资料优先审核
  • 免费资料无限下载

上传资料

关闭

关闭

关闭

封号提示

内容

首页 A Primer on Memory Consistency and Cache Coheren…

A Primer on Memory Consistency and Cache Coherence.pdf

A Primer on Memory Consistency …

sailing_王齐
2011-09-28 0人阅读 举报 0 0 0 暂无简介

简介:本文档为《A Primer on Memory Consistency and Cache Coherencepdf》,可适用于IT/计算机领域

MorganClaypoolPublisherswwwmorganclaypoolcomSeriesEditor:MarkDHill,UniversityofWisconsinMORGANCLAYPOOLCMMorganClaypoolPublishersAboutSYNTHESIsThisvolumeisaprintedversionofaworkthatappearsintheSynthesisDigitalLibraryofEngineeringandComputerScienceSynthesisLecturesprovideconcise,originalpresentationsofimportantresearchanddevelopmenttopics,publishedquickly,indigitalandprintformatsFormoreinformationvisitwwwmorganclaypoolcomSYNTHESISLECTURESONCOMPUTERARCHITECTUREMarkDHill,SeriesEditorISBN:SeriesISSN:SYNTHESISLECTURESONCOMPUTERARCHITECTUREAPRIMERONMEMORYCONSISTENCYANDCACHECOHERENCESORIN•HILL•WOODAPrimeronMemoryConsistencyandCacheCoherenceDanielJSorin,DukeUniversityMarkDHillandDavidAWood,UniversityofWisconsin,MadisonManymoderncomputersystemsandmostmulticorechips(chipmultiprocessors)supportsharedmemoryinhardwareInasharedmemorysystem,eachoftheprocessorcoresmayreadandwritetoasinglesharedaddressspaceForasharedmemorymachine,thememoryconsistencymodeldefinesthearchitecturallyvisiblebehaviorofitsmemorysystemConsistencydefinitionsproviderulesaboutloadsandstores(ormemoryreadsandwrites)andhowtheyactuponmemoryAspartofsupportingamemoryconsistencymodel,manymachinesalsoprovidecachecoherenceprotocolsthatensurethatmultiplecachedcopiesofdataarekeptuptodateThegoalofthisprimeristoprovidereaderswithabasicunderstandingofconsistencyandcoherenceThisunderstandingincludesboththeissuesthatmustbesolvedaswellasavarietyofsolutionsWepresentbothhighlevelconceptsaswellasspecific,concreteexamplesfromrealworldsystemsAPrimeronMemoryConsistencyandCacheCoherenceDanielJSorinMarkDHillDavidAWoodAPrimeronMemoryConsistencyandCacheCoherenceiiOnelinerChapterTitleSynthesisLecturesonComputerArchitectureEditorMarkDHill,UniversityofWisconsinSynthesisLecturesonComputerArchitecturepublishestopagepublicationsontopicspertainingtothescienceandartofdesigning,analyzing,selectingandinterconnectinghardwarecomponentstocreatecomputersthatmeetfunctional,performanceandcostgoalsThescopewilllargelyfollowthepurviewofpremiercomputerarchitectureconferences,suchasISCA,HPCA,MICRO,andASPLOSAPrimeronMemoryConsistencyandCacheCoherenceDanielJSorin,MarkDHill,andDavidAWoodDynamicBinaryModification:Tools,Techniques,andApplicationsKimHazelwoodQuantumComputingforComputerArchitects,SecondEditionTzvetanSMetodi,ArvinIFaruque,FredericTChongHighPerformanceDatacenterNetworks:Architectures,Algorithms,andOpportunitiesDennisAbts,JohnKimProcessorMicroarchitecture:AnImplementationPerspectiveAntonioGonzález,FernandoLatorre,andGrigoriosMagklisTransactionalMemory,ndeditionTimHarris,JamesLarus,andRaviRajwarComputerArchitecturePerformanceEvaluationModelsLievenEeckhoutIntroductiontoReconfigurableSupercomputingMarcoLanzagorta,StephenBique,andRobertRosenbergOnChipNetworksNatalieEnrightJergerandLiShiuanPehTheMemorySystem:YouCan’tAvoidIt,YouCan’tIgnoreIt,YouCan’tFakeItBruceJacobFaultTolerantComputerArchitectureDanielJSorinTheDatacenterasaComputer:AnIntroductiontotheDesignofWarehouseScaleMachinesLuizAndréBarrosoandUrsHölzleComputerArchitectureTechniquesforPowerEfficiencyStefanosKaxirasandMargaretMartonosiChipMultiprocessorArchitecture:TechniquestoImproveThroughputandLatencyKunleOlukotun,LanceHammond,andJamesLaudonTransactionalMemoryJamesRLarusandRaviRajwarQuantumComputingforComputerArchitectsTzvetanSMetodiandFredericTChongiiiCopyright©byMorganClaypoolAllrightsreservedNopartofthispublicationmaybereproduced,storedinaretrievalsystem,ortransmittedinanyformorbyanymeanselectronic,mechanical,photocopy,recording,oranyotherexceptforbriefquotationsinprintedreviews,withoutthepriorpermissionofthepublisherAPrimeronMemoryConsistencyandCacheCoherenceDanielJSorin,MarkDHill,andDavidAWoodwwwmorganclaypoolcomISBN:paperbackISBN:ebookDOI:SEDVYCACAPublicationintheMorganClaypoolPublishersseriesSYNTHESISLECTURESONCOMPUTERARCHITECTURE#Lecture#SeriesEditor:MarkDHill,UniversityofWisconsinSeriesISSNISSNprintISSNelectronicAPrimeronMemoryConsistencyandCacheCoherenceDanielJSorin,MarkDHill,andDavidAWoodSYNTHESISLECTURESONCOMPUTERARCHITECTURE#ABSTRACTManymoderncomputersystemsandmostmulticorechips(chipmultiprocessors)supportsharedmemoryinhardwareInasharedmemorysystem,eachoftheprocessorcoresmayreadandwritetoasinglesharedaddressspaceForasharedmemorymachine,thememoryconsistencymodeldefinesthearchitecturallyvisiblebehaviorofitsmemorysystemConsistencydefinitionsproviderulesaboutloadsandstores(ormemoryreadsandwrites)andhowtheyactuponmemoryAspartofsupportingamemoryconsistencymodel,manymachinesalsoprovidecachecoherenceprotocolsthatensurethatmultiplecachedcopiesofdataarekeptuptodateThegoalofthisprimeristoprovidereaderswithabasicunderstandingofconsistencyandcoherenceThisunderstandingincludesboththeissuesthatmustbesolvedaswellasavarietyofsolutionsWepresentbothhighlevelconceptsaswellasspecific,concreteexamplesfromrealworldsystemsviKEYWORDScomputerarchitecture,memoryconsistency,cachecoherence,sharedmemory,memorysystems,multicoreprocessor,multiprocessorviiThisprimerisintendedforreaderswhohaveencounteredmemoryconsistencyandcachecoherenceinformally,butnowwanttounderstandwhattheyentailinmoredetailThisaudienceincludescomputingindustryprofessionalsaswellasjuniorgraduatestudentsWeexpectourreaderstobefamiliarwiththebasicsofcomputerarchitectureRememberingthedetailsofTomasulo’salgorithmorsimilardetailsisunnecessary,butwedoexpectreaderstounderstandissueslikearchitecturalstate,dynamicinstructionscheduling(outoforderexecution),andhowcachesareusedtoreduceaveragelatenciestoaccessstoragestructuresTheprimarygoalofthisprimeristoprovidereaderswithabasicunderstandingofconsistencyandcoherenceThisunderstandingincludesboththeissuesthatmustbesolvedaswellasavarietyofsolutionsWepresentbothhighlevelconceptsaswellasspecific,concreteexamplesfromrealworldsystemsAsecondarygoalofthisprimeristomakereadersawareofjusthowcomplicatedconsistencyandcoherenceareIfreaderssimplydiscoverwhatitisthattheydonotknowwithoutactuallylearningitthatdiscoveryisstillasubstantialbenefitFurthermore,becausethesetopicsaresovastandsocomplicated,itisbeyondthescopeofthisprimertocoverthemexhaustivelyItisnotagoalofthisprimertocoveralltopicsindepth,butrathertocoverthebasicsandapprisethereadersofwhattopicstheymaywishtopursueinmoredepthWeowemanythanksforthehelpandsupportwehavereceivedduringthedevelopmentofthisprimerWethankBlakeHechtmanforimplementingandtesting(anddebugging!)allofthecoherenceprotocolsinthisprimerAsthereaderwillsoondiscover,coherenceprotocolsarecomplicated,andwewouldnothavetrustedanyprotocolthatwehadnottested,soBlake’sworkwastremendouslyvaluableBlakeimplementedandtestedalloftheseprotocolsusingtheWisconsinGEMSsimulationinfrastructurehttp:wwwcswiscedugemsForreviewingearlydraftsofthisprimerandforhelpfuldiscussionsregardingvarioustopicswithintheprimer,wegratefullythankTreyCainandMiloMartinForprovidingadditionalfeedbackontheprimer,wethankNewshaArdalani,ArkapravaBasu,BradBeckmann,BobCypher,JoeDevietti,SandipGovindDhoot,AlexEdelsburg,JayneelGandhi,DanGibson,MarisabelGuevara,GaganGupta,BlakeHechtman,DerekHower,ZacharyMarzec,HiranMayukh,RalphNathan,MarcOrr,VijaySathish,AbhiramiSenthilkumaran,SimhaSethumadhavan,VenkatanathanPrefaceviiiAPRIMERONMEMORYCONSISTENCYANDCACHECOHERENCEVaradarajan,DerekWilliams,andMengZhangWhileourreviewersprovidedgreatfeedback,theymayormaynotagreewithallofthefinalcontentsofthisprimerThisworkissupportedinpartbytheNationalScienceFoundation(CNS,CNS,CCF,CCF,andCCF),SandiaDOE(#MSNDOE),SemiconductorResearchCorporation(contractHJ),andtheUniversityofWisconsin(KellettAwardtoHill)TheviewsexpressedhereinarenotnecessarilythoseoftheNSF,Sandia,DOE,orSRCDanthanksDeborah,Jason,andJuliefortheirloveandforputtingupwithhimtakingthetimetoworkonanothersynthesislectureDanthankshisUncleSolforhelpinginspirehimtobeanengineerinthefirstplaceLastly,DandedicatesthisbooktothememoryofRustySneiderman,atreasuredfriendofthirtyyearswhowillbedearlymissedbyeveryonewhowasluckyenoughtohaveknownhimMarkwishestothankSue,Nicole,andGregoryfortheirloveandsupportDavidthankshiscoauthorsforputtingupwithhisdeadlinechallengedworkstyle,hisparentsRogerandAnnWoodforinspiringhimtobeasecondgenerationComputerSciencesprofessor,andJane,Alex,andZachforhelpinghimrememberwhatlifeisallaboutixPrefaceixIntroductiontoConsistencyandCoherenceConsistency(aka,MemoryConsistency,MemoryConsistencyModel,orMemoryModel)Coherence(aka,CacheCoherence)AConsistencyandCoherenceQuizWhatthisPrimerDoesNotDoCoherenceBasicsBaselineSystemModelTheProblem:HowIncoherenceCouldPossiblyOccurDefiningCoherenceMaintainingtheCoherenceInvariantsTheGranularityofCoherenceTheScopeofCoherenceReferencesMemoryConsistencyMotivationandSequentialConsistencyProblemswithSharedMemoryBehaviorWhatIsaMemoryConsistencyModelConsistencyvsCoherenceBasicIdeaofSequentialConsistency(SC)ALittleSCFormalismNaiveSCImplementationsABasicSCImplementationwithCacheCoherenceOptimizedSCImplementationswithCacheCoherenceAtomicOperationswithSCPuttingitAllTogether:MIPSRContentsxAPRIMERONMEMORYCONSISTENCYANDCACHECOHERENCEFurtherReadingRegardingSCReferencesTotalStoreOrderandthexMemoryModelMotivationforTSOxBasicIdeaofTSOxALittleTSOFormalismandanxConjectureImplementingTSOxAtomicInstructionsandFenceswithTSOAtomicInstructionsFencesFurtherReadingRegardingTSOComparingSCandTSOReferencesRelaxedMemoryConsistencyMotivationOpportunitiestoReorderMemoryOperationsOpportunitiestoExploitReorderingAnExampleRelaxedConsistencyModel(XC)TheBasicIdeaoftheXCModelExamplesUsingFencesunderXCFormalizingXCExamplesShowingXCOperatingCorrectlyImplementingXCAtomicInstructionswithXCFenceswithXCACaveatSequentialConsistencyforDataRaceFreeProgramsSomeRelaxedModelConceptsReleaseConsistencyCausalityandWriteAtomicityARelaxedMemoryModelCaseStudy:IBMPowerFurtherReadingandCommercialRelaxedMemoryModelsAcademicLiteratureCommercialModelsComparingMemoryModelsHowDoRelaxedMemoryModelsRelatetoEachOtherandTSOandSCHowGoodAreRelaxedModelsHighLevelLanguageModelsReferencesCoherenceProtocolsTheBigPictureSpecifyingCoherenceProtocolsExampleofaSimpleCoherenceProtocolOverviewofCoherenceProtocolDesignSpaceStatesTransactionsMajorProtocolDesignOptionsReferencesSnoopingCoherenceProtocolsIntroductiontoSnoopingBaselineSnoopingProtocolHighLevelProtocolSpecificationSimpleSnoopingSystemModel:AtomicRequests,AtomicTransactionsBaselineSnoopingSystemModel:NonAtomicRequests,AtomicTransactionsRunningExampleProtocolSimplificationsAddingtheExclusiveStateMotivationGettingtotheExclusiveStateHighLevelSpecificationofProtocolDetailedSpecificationRunningExample

用户评价(0)

关闭

新课改视野下建构高中语文教学实验成果报告(32KB)

抱歉,积分不足下载失败,请稍后再试!

提示

试读已结束,如需要继续阅读或者下载,敬请购买!

评分:

/42

VIP

意见
反馈

免费
邮箱