OS

Concurrency and Parallelism

No Subtitle :>

Posted by PYQ on December 22, 2023

Concurrency and Parallelism

Concurrency vs. parallelism

  • Concurrency is about dealing with lots of things at once.
  • Parallelism is about doing lots of things at once.
  • Not the same, but related.
  • Concurrency is about structure, parallelism is about execution.
  • Concurrency provides a way to structure a solution to solve a problem that may (but not necessarily) be parallelizable.

Concurrency plus communication

  • Concurrency is a way to structure a program by breaking it into pieces that can be executed independently.
  • Communication is the means to coordinate the independent executions.

Conclusion

  • Concurrency is powerful.
  • Concurrency is not parallelism.
  • Concurrency enables parallelism.
  • Concurrency makes parallelism (and scaling and everything else) easy.