Process-Based Parallelism

In the previous chapter, we learned how to use threads to implement concurrent applications. This chapter will examine the process-based approach that we introduced in Chapter 1, Getting Started with Parallel Computing and PythonIn particular, the focus of the chapter is on the Python multiprocessing module.

The Python multiprocessing module, which is a part of the standard library of the language, implements the shared memory programming paradigm, that is, the programming of a system that consists of one or more processors that have access to a shared memory.

In this chapter, we will cover the following recipes:

  • Understanding Python's multiprocessing module
  • Spawning a process
  • Naming a process
  • Running processes in the background
  • Killing a process
  • Defining a process in a subclass
  • Using a queue to exchange objects
  • Using pipes to exchange objects
  • Synchronizing processes
  • Managing a state between processes
  • Using a process pool
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.228.88