MyLeoNes™

Parallelism: doing work at the same time — Computing, 11–13

Parallelism splits work so several parts can be handled together, when the parts do not depend on one another.

The big idea

Parallelism means carrying out separate pieces of work at the same time instead of waiting for one long line to finish. A computer may use several processor cores, or several computers may share a large job. The result can arrive sooner, but only if the pieces can safely run together.

The problem it solves

Some computer jobs contain millions of independent pieces, such as colouring pixels or checking possible moves. Doing them one after another wastes time while other processors sit idle. Parallelism uses those processors together, although coordinating them also costs time and can create conflicts.

A worked example

Imagine colouring 1,000 picture pixels, with four workers. Step 1: split the picture into four blocks of 250 pixels. Step 2: each worker colours one block at the same time. Step 3: join the blocks. If each block takes 10 seconds, the work takes about 10 seconds plus splitting and joining, rather than about 40 seconds in one line.

A tempting mistake

It is reasonable to think that four workers always make a job four times faster. They cannot help if later steps need earlier results, or if splitting and coordination take a long time. Parallelism speeds up suitable parts; it does not magically speed up every program.

Where you meet it

Parallelism is used when phones edit video, consoles draw game worlds, and large computers analyse images or scientific measurements. A web service may also answer many people at once instead of making each person wait for the previous one. Good design separates independent work and protects shared information from clashes.

Keep exploring

Other languages

Loading MyLeoNes™…