Tuesday, December 3, 2013

What is the difference between Concurrency and Parallelism?

Parallelism:
            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.
          Ex: Multitasking in a single core processor.

No comments:

Post a Comment