Book Image

Parallel Programming with Python

By : Jan Palach, Jan Palach V Cruz da Silva
Book Image

Parallel Programming with Python

By: Jan Palach, Jan Palach V Cruz da Silva

Overview of this book

Table of Contents (16 chapters)
Parallel Programming with Python
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Processing and mapping


The number of workers is not always large enough to resolve a specific problem in a single step. Therefore, the decomposition techniques presented in the previous sections are necessary. However, decomposition techniques should not be applied arbitrarily; there are factors that can influence the performance of the solution. After decomposing data or tasks, the question we ought to ask is, "How do we divide the processing load among workers to obtain good performance?" This is not an easy question to answer, as it all depends on the problem under study.

Basically, we could mention two important steps when defining process mapping:

  • Identifying independent tasks

  • Identifying tasks that require data exchange

Identifying independent tasks

Identifying independent tasks in a system allows us to distribute the tasks among different workers, as these tasks do not need constant communication. As there is no need for a data location, tasks can be executed in different workers without...