liveBook · Manning

Multiprocessing

Multiprocessing is a programming technique that executes work in multiple operating-system processes, enabling concurrent or parallel execution across available processor resources.

How 3 Manning books explain it

Python Concurrency with asyncio

Multiprocessing is a concurrency technique in which multiple processes perform work concurrently, typically with a parent process managing child processes.

How it is used
Uses multiprocessing to parallelize CPU-bound work and extend asyncio when asynchronous tasks would block the event loop.
How deep it goes
Explains parent-child processes, start and join, process pools, serialization, shared state, and event-loop-per-process designs.
Examples
Demonstrates child-process greetings, Fibonacci computation, pooled counting, and database queries handled by one event loop per process.
What you can do after
Builds process-based workers, distribute CPU-bound calls through ProcessPoolExecutor, and combine process pools with asyncio.

Read how Python Concurrency with asyncio explains multiprocessing →

Fast Python: High performance techniques for large datasets

How it is used
Uses multiprocessing to run a pure-Python, in-memory MapReduce implementation across available CPU cores.
How deep it goes
Works through an executor substitution, diagnoses a pickling failure, and gives communication guidance without developing shared-memory or low-level locking techniques.
Examples
Uses a ProcessPoolExecutor MapReduce worker whose lambda fails to pickle and whose named-function replacement succeeds.
What you can do after
Apply it via ProcessPoolExecutor to parallelize coarse-grained Python work and diagnose worker-transfer or communication bottlenecks.

Read how Fast Python: High performance techniques for large datasets explains multiprocessing →

Learn Concurrent Programming with Go

An operating-system capability in which multiple tasks are managed so that more than one can make progress on available processor resources.

How it is used
Keeps processor resources productive by switching to other tasks when the current task waits for input or I/O.
How deep it goes
Explains job, ready, running, and I/O waiting states, then demonstrates process coordination through a buffered pipe.
Examples
Uses a large-file string search and a curl-to-wc UNIX pipeline to illustrate scheduling, process IDs, buffering, and termination.
What you can do after
Evaluate/understand how operating systems schedule tasks and coordinate command-line processes through pipes.

Read how Learn Concurrent Programming with Go explains multiprocessing →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.