资源描述:
《高级计算机体系结构 10 存储器层次结构课件.ppt》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、Lecture10:MemoryHierarchy:ReducingHitTime,MainMemory,&ExamplesSpring2010SuperComputingLab.Review:ReducingMisses3Cs:Compulsory,Capacity,ConflictMissesReducingMissRate1.ReduceMissesviaLargerBlockSize2.ReduceMissesviaHigherAssociativity3.ReducingMissesviaVictimCache4.ReducingMissesv
2、iaPseudo-Associativity5.ReducingMissesbyHWPrefetchingInstr,Data6.ReducingMissesbySWPrefetchingData7.ReducingMissesbyCompilerOptimizationsRememberdangerofconcentratingonjustoneparameterwhenevaluatingperformanceReducingMissPenaltySummaryFivetechniquesReadpriorityoverwriteonmissSubbl
3、ockplacementEarlyRestartandCriticalWordFirstonmissNon-blockingCaches(HitunderMiss,MissunderMiss)SecondLevelCacheCanbeappliedrecursivelytoMultilevelCachesDangeristhattimetoDRAMwillgrowwithmultiplelevelsinbetweenFirstattemptsatL2cachescanmakethingsworse,sinceincreasedworstcaseiswors
4、eReview:ImprovingCachePerformance1.Reducethemissrate,2.Reducethemisspenalty,or3.Reducethetimetohitinthecache-hittime:readtag+compare1.FastHittimesviaSmallandSimpleCachesWhyAlpha21164has8KBInstructionand8KBdatacache+96KBsecondlevelcache?Smalldatacache(faster)andclockrate(on-chip)D
5、irectMapped,onchipAdvantage:overlaptagcheck&datatransfer1.FastHittimesviaSmallandSimpleCachesIndextagmemoryandthencomparetakestimeSmallcachecanhelphittimesincesmallermemorytakeslesstimetoindexE.g.,L1cachessamesizefor3generationsofAMDmicroprocessors:K6,Athlon,andOpteronAlsoL2cach
6、esmallenoughtofitonchipwiththeprocessoravoidstimepenaltyofgoingoffchipSimpledirectmappingCanoverlaptagcheckwithdatatransmissionsincenochoiceAccesstimeestimatefor90nmusingCACTImodel4.0Medianratiosofaccesstimerelativetothedirect-mappedcachesare1.32,1.39,and1.43for2-way,4-way,and8-w
7、aycaches2.FasthitsbyAvoidingAddressTranslationSendvirtualaddresstocache:CalledVirtuallyAddressedCacheorjustVirtualCachevs.PhysicalCacheEverytimeprocessisswitchedlogicallymustflushthecache;otherwisegetfalsehitsCostistimetoflush+“compulsory”missesfromemptycacheDealingwithaliases(som
8、etimescalledsynonyms);Twodiffere