Memory Barriers a Hardware View for Software Hackers.pdf

Memory Barriers a Hardware View for Software Hackers.pdf

ID:34855836

大小:299.39 KB

頁數(shù):28頁

時間:2019-03-12

Memory Barriers a Hardware View for Software Hackers.pdf_第1頁
Memory Barriers a Hardware View for Software Hackers.pdf_第2頁
Memory Barriers a Hardware View for Software Hackers.pdf_第3頁
Memory Barriers a Hardware View for Software Hackers.pdf_第4頁
Memory Barriers a Hardware View for Software Hackers.pdf_第5頁
資源描述:

《Memory Barriers a Hardware View for Software Hackers.pdf》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在學術(shù)論文-天天文庫。

1、MemoryBarriers:aHardwareViewforSoftwareHackersPaulE.McKenneyLinuxTechnologyCenterIBMBeavertonpaulmck@linux.vnet.ibm.comJuly23,2010SowhatpossessedCPUdesignerstocausethemingteninstructionspernanosecond,butwillrequiretoin?ictmemorybarriersonpoorunsuspectingSM

2、Pmanytensofnanosecondstofetchadataitemfromsoftwaredesigners?mainmemory.Thisdisparityinspeed—morethanInshort,becausereorderingmemoryreferencesal-twoordersofmagnitude—hasresultedinthemulti-lowsmuchbetterperformance,andsomemorybarri-megabytecachesfoundonmoder

3、nCPUs.Theseersareneededtoforceorderinginthingslikesynchro-cachesareassociatedwiththeCPUsasshowninFig-nizationprimitiveswhosecorrectoperationdependsure1,andcantypicallybeaccessedinafewcycles.1onorderedmemoryreferences.Gettingamoredetailedanswertothisquestio

4、nrequiresagoodunderstandingofhowCPUcachesCPU0CPU1work,andespeciallywhatisrequiredtomakecachesreallyworkwell.Thefollowingsections:1.presentthestructureofacache,CacheCache2.describehowcache-coherencyprotocolsensureInterconnectthatCPUsagreeonthevalueofeachloc

5、ationinmemory,and,?nally,3.outlinehowstorebu?ersandinvalidatequeuesMemoryhelpcachesandcache-coherencyprotocolsachievehighperformance.Wewillseethatmemorybarriersareanecessaryevilthatisrequiredtoenablegoodperformanceandscal-Figure1:ModernComputerSystemCacheS

6、tructureability,anevilthatstemsfromthefactthatCPUsareordersofmagnitudefasterthanareboththein-Data?owsamongtheCPUs’cachesandmemoryterconnectsbetweenthemandthememorytheyarein?xed-lengthblockscalled“cachelines”,whichareattemptingtoaccess.normallyapoweroftwoin

7、size,rangingfrom16to256bytes.Whenagivendataitemis?rstaccessedby1CacheStructure1Itisstandardpracticetousemultiplelevelsofcache,withasmalllevel-onecacheclosetotheCPUwithsingle-cycleac-cesstime,andalargerlevel-twocachewithalongeraccessModernCPUsaremuchfastert

8、hanaremodernmem-time,perhapsroughlytenclockcycles.Higher-performanceorysystems.A2006CPUmightbecapableofexecut-CPUsoftenhavethreeorevenfourlevelsofcache.1Way0Way1agivenCPU,itwillbeabsentfromthatCPU’scache,0x00

當前文檔最多預覽五頁,下載文檔查看全文

此文檔下載收益歸作者所有

當前文檔最多預覽五頁,下載文檔查看全文
溫馨提示:
1. 部分包含數(shù)學公式或PPT動畫的文件,查看預覽時可能會顯示錯亂或異常,文件下載后無此問題,請放心下載。
2. 本文檔由用戶上傳,版權(quán)歸屬用戶,天天文庫負責整理代發(fā)布。如果您對本文檔版權(quán)有爭議請及時聯(lián)系客服。
3. 下載前請仔細閱讀文檔內(nèi)容,確認文檔內(nèi)容符合您的需求后進行下載,若出現(xiàn)內(nèi)容與標題不符可向本站投訴處理。
4. 下載文檔時可能由于網(wǎng)絡波動等原因無法下載或下載錯誤,付費完成后未能成功下載的用戶請聯(lián)系客服處理。