浙江大学多核计算课件03
Fundamental Concepts of Parallel ProgrammingZJU-Intel Embedded Technology Centerhttp:/embedded.zju.edu.cnDesigning for ThreadspTask DecompositionpData DecompositionpData Flow DecompositionDecompositi onDesignCommentsTaskDifferent activities assigned to different threadsCommon in GUI appsDataMultiple thread performing the same operation but on different blocks of dataCommon in audio processing, imaging, and in scientific programmingData FlowOne threads output is the input to a second threadSpecial care is needed to eliminate startup and shutdown latenciesZJU-Intel Embedded Technology Centerhttp:/embedded.zju.edu.cnChallengespSynchronizationnThe process by which two or more threads coordinate their activitiespCommunicationnThe bandwidth and latency issues associated with exchanging data between threadspLoad balancingnThe distribution of work across multiple threads so that they all perform roughly the same amount of workpScalabilitynThe challenge of making efficient use of a larger number of threads when software is run on more-capable systemsZJU-Intel Embedded Technology Centerhttp:/embedded.zju.edu.cnParallel Programming PatternsPatternDecompositionTask-level parallelismTaskDivide and ConquerTask/DataGeometric DecompositionDataPipelineData FlowWavefrontData Flow