Parallelism is when multiple tasks literally executing at the same time. This arises when two threads are executing simultaneously.
Ex: Running Multiple tasks on a multi core processor.
Concurrency:
- Concurrency is when multiple tasks can start, run and complete execution in overlapping time periods. It doesn't necessarily mean that they will be running at the same instant.
- This occurs when at least two threads are making progress.
- This is a more generalized form of parallelism that includes time-slicing as a form of virtual parallelism.
No comments:
Post a Comment