欢迎来到天天文库
浏览记录
ID:34282286
大小:383.23 KB
页数:6页
时间:2019-03-04
《Mechanical Sympathy_ Memory Barriers_Fences.pdf》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、13-6-14MechanicalSympathy:MemoryBarriers/Fences分享17更多下一個網誌»建立網誌登入MechanicalSympathyHardwareandsoftwareworkingtogetherinharmonySunday,24July2011SearchThisBlogMemoryBarriers/FencesSearchInthisarticleI'lldiscussthemostfundamentaltechniqueinconcurrentprogramming
2、knownasmemorybarriers,orUpcomingEventsfences,thatmakethememorystatewithinaprocessorvisibletootherprocessors.PerformanceTestingJavaCPUshaveemployedmanytechniquestotryandaccommodatethefactthatCPUexecutionunitperformancehasApplications-SkillsMatterLondongreatly
3、outpacedmainmemoryperformance.Inmy“WriteCombining”articleItouchedonjustoneoftheseJavavs.C++PanelDebate-techniques.ThemostcommontechniqueemployedbyCPUstohidememorylatencyistopipelineinstructionsandGOTOChicagothenspendsignificanteffort,andresource,ontryingtore
4、-orderthesepipelinestominimisestallsrelatedtocacheTop10PerformanceFolklore-misses.GOTOChicagoWhenaprogramisexecuteditdoesnotmatterifitsinstructionsarere-orderedprovidedthesameendresultisachieved.Forexample,withinaloopitdoesnotmatterwhentheloopcounterisupdate
5、difnooperationwithintheloopAboutMeusesit.ThecompilerandCPUarefreetore-ordertheinstructionstobestutilisetheCPUprovideditisupdatedbytheMartinThompsontimethenextiterationisabouttocommence.Alsoovertheexecutionofaloopthisvariablemaybestoredinaregisterandneverpush
6、edouttocacheormainmemory,thusitisnevervisibletoanotherCPU.Technologygeekexploringthecapabilitiesofmodernhardware.CPUcorescontainmultipleexecutionunits.Forexample,amodernIntelCPUcontains6executionunitswhichcandoAvailablefordevelopment,training,performancetuni
7、ng,andacombinationofarithmetic,conditionallogic,andmemorymanipulation.Eachexecutionunitcandosomecombinationconsultingservices.ofthesetasks.Theseexecutionunitsoperateinparallelallowinginstructionstobeexecutedinparallel.Thisintroducesanotherlevelofnon-determin
8、ismtoprogramorderifitwasobservedfromanotherCPU.ViewmycompleteprofileFinally,whenacache-missoccurs,amodernCPUcanmakeanassumptionontheresultsofamemoryloadandPopularPostscontinueexecutingbasedonthi
此文档下载收益归作者所有