Parallelism and Concurrency

Parallelism is the task of running multiple computations on two different threads simultaneously: when one problem is solved by multiple processors. Concurrency is the task of managing multiple computations at once: when two or more problems are solved by a single processor.[1]

Non-concurrent and non-parallel:

|||||-||-||||||||-||||||-||-|||

Concurrent and non-parallel:

-------|||||||||-----------||||
-----||---------||||||--|||----
|||||-----------------||-------

Concurrent and parallel:

|||||||||-||||-----------------
||-||||||-|||------------------
|||||-||-----------------------

References

  1. https://scribe.rip/retention-science/ruby-is-still-a-diamond-b789d2661266

Last modified: 202401040446