liveBook · Manning

Parallelism

As explained in Rust Servers, Services, and Apps

Parallelism is the simultaneous execution of multiple computations, typically on separate processors or cores.

Parallelism is the simultaneous execution of multiple tasks. It differs from concurrency, which can also mean executing tasks out of order. Both can help process multiple incoming requests efficiently. section 10.1 section 10.6

Two tasks on two CPUs

Imagine two Rust functions running at the same time, with one scheduled on CPU 1 and the other on CPU 2. This illustrates parallel processing, though it does not establish that this is the most efficient way to use CPU time. section 10.1

Figure 10.1 Concurrency vs. parallelism

Compare the illustration of concurrency and parallelism. section 10.1

How Rust Servers, Services, and Apps covers it

How deep it goes
Defines simultaneous task execution and contrasts concurrency, illustrating CPU assignment without detailing parallelism implementation.
Examples
Illustrates two Rust functions assigned to separate CPUs and discusses processing multiple incoming requests.
What you can do after
Understand how simultaneous tasks can use multiple CPUs or cores to improve execution and request-processing efficiency.
How it connects
Connects parallelism with concurrency, multithreading, asynchronous programming, CPUs, and CPU-intensive and I/O-intensive tasks.

Also explained in

Compare how 38 books explain parallelism →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Rust Servers, Services, and Apps. The section links point to the parts of the book it draws on.