Writing Parallel software Task parallelism Concept parallelism achieved through the partition of load into "baskets of work" consumed by a pool of resources. Implications o requires splitting the processing into blocks o and dealing with dependencies between them o well adapted to data processing frameworks Thread/process pools usually useful a pool a workers is created at start o and reused during all processing tasks are mapped to available workers what find expect 8/46 S.Ponce-CERN
Writing Parallel software 8 / 46 S. Ponce - CERN Intro Threading Safety Solutions what find expect Task parallelism Concept parallelism achieved through the partition of load into “baskets of work” consumed by a pool of resources. Implications requires splitting the processing into blocks and dealing with dependencies between them well adapted to data processing frameworks Thread/process pools usually useful a pool a workers is created at start and reused during all processing tasks are mapped to available workers
Writing Parallel software Task parallelism example Event reconstruction case o processing consists in running a bunch of algorithms o originally as a sequence ○0☐001■○ what find expect 9/46 S.Ponce-CERN
Writing Parallel software 9 / 46 S. Ponce - CERN Intro Threading Safety Solutions what find expect Task parallelism example Event reconstruction case processing consists in running a bunch of algorithms originally as a sequence now as a dependency graph using a thread pool and a scheduler mapping what can be done to available threads
Writing Parallel software Task parallelism example Event reconstruction case o processing consists in running a bunch of algorithms o originally as a sequence ○I■0■○ onow as a dependency graph o using a thread pool and a scheduler mapping what can be done to available threads 010 what find expect 9/46 S.Ponce-CERN
Writing Parallel software 9 / 46 S. Ponce - CERN Intro Threading Safety Solutions what find expect Task parallelism example Event reconstruction case processing consists in running a bunch of algorithms originally as a sequence now as a dependency graph using a thread pool and a scheduler mapping what can be done to available threads
Writing Parallel software Data parallelism Concept parallelism achieved through the application of the same transformation to multiple pieces of data Implications o requires independent pieces of data o may have an impact on data structures o and potentially on memory Practically for our event processing example 时Hp 10/46 S.Ponce-CERN
Writing Parallel software 10 / 46 S. Ponce - CERN Intro Threading Safety Solutions what find expect Data parallelism Concept parallelism achieved through the application of the same transformation to multiple pieces of data Implications requires independent pieces of data may have an impact on data structures and potentially on memory Practically for our event processing example
Writing Parallel software 花5 Overall Strategy Data or task based parallelism o Definitely both concurrently o Use as much parallelism as you can o allows to hide dependencies/contention o and to keep the hardware busy what find empect 11/46 S.Ponce-CERN
Writing Parallel software 11 / 46 S. Ponce - CERN Intro Threading Safety Solutions what find expect Overall Strategy Data or task based parallelism ? Definitely both concurrently Use as much parallelism as you can allows to hide dependencies/contention and to keep the hardware busy