26-parallelism

26-parallelism

ID:40354440

大小:426.39 KB

页数:53页

时间:2019-07-31

26-parallelism_第1页
26-parallelism_第2页
26-parallelism_第3页
26-parallelism_第4页
26-parallelism_第5页
资源描述:

《26-parallelism》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库

1、CarnegieMellonThread-LevelParallelism15-213/18-213:IntroductiontoComputerSystems26thLecture,April21,2015Instructors:SethCopenGoldstein,FranzFranchetti,RalfBrown,andBrianRailing1CarnegieMellonTodayParallelComputingHardwareMulticoreMultipleseparateprocessorsonsinglechipHowtheymaintainconsistentvi

2、ewofmemoryHyperthreadingEfficientexecutionofmultiplethreadsonsinglecoreThread-LevelParallelismSplittingprogramintoindependenttasksExample:ParallelsummationSomeperformanceartifactsDivide-andconquerparallelismExample:Parallelquicksort2CarnegieMellonMulticoreProcessorCore0Coren-1RegsRegsL1L1L1

3、L1d-cachei-cache…d-cachei-cacheL2unifiedcacheL2unifiedcacheL3unifiedcache(sharedbyallcores)MainmemoryIntelNehalemProcessorE.g.,Sharkmachines(8cores/machine)Multipleprocessorsoperatingwithcoherentviewofmemory3CarnegieMellonMemoryConsistencyinta=1;intb=100;Thread1:Thread2:Wa:a=2;Wb:b=200;Rb:print(

4、b);Ra:print(a);Whatarethepossiblevaluesprinted?DependsonmemoryconsistencymodelAbstractmodelofhowhardwarehandlesconcurrentaccesses4CarnegieMellonNon-CoherentCacheScenariointa=1;Write-backcaches,withoutintb=100;coordinationbetweenthemThread1:Thread2:Wa:a=2;Wb:b=200;Rb:print(b);Ra:print(a);Thread1

5、CacheThread2Cachea:2b:100a:1b:200print1print100MainMemorya:1b:1005CarnegieMellonMemoryConsistencyinta=1;intb=100;ThreadconsistencyconstraintsWaRbThread1:Thread2:Wa:a=2;Wb:b=200;WbRaRb:print(b);Ra:print(a);Whatarethepossiblevaluesprinted?DependsonmemoryconsistencymodelAbstractmodelofhowhardwareha

6、ndlesconcurrentaccesses6CarnegieMellonMemoryConsistencyinta=1;intb=100;ThreadconsistencyconstraintsWaRbThread1:Thread2:Wa:a=2;Wb:b=200;WbRaRb:print(b);Ra:print(a);Whatarethepossiblevaluesprinted?DependsonmemoryconsistencymodelAbstractmodelofhowhardwarehandlesconcurrentaccessesSequentialconsiste

7、ncyOveralleffectconsistentwitheachindividualthreadOtherwise,arbitraryinterleaving7CarnegieMellonSequentialConsistencyExampleThreadconsistencyinta=1;constraintsintb=100;WaRbWbRaThread1:Thread2:Wa:a=2;Wb:b=

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。
相关文章
更多
相关标签