Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What is the difference between concurrency and parallelism? Is parallel program by default concurrent, or is concurrent program by default parallel?

The machine that runs the program has multi-core processor?

user-image
Question added by Deleted user
Date Posted: 2013/08/22
Muhammed Sallout
by Muhammed Sallout , Technology Development Manager , GLORY TECHNOLOGY

Parallelism is one form of Concurrency, where Concurrency means, that task A and task B both need to happen independently of each other, and B starts before A is finished.
There are various different ways of concurrency: One of them is parallelism--having multiple CPUs working on the different tasks at the same time.
But that's not the only way.
Another is by task switching, which works like this: Task A works up to a certain point, then the CPU working on it stops and switches over to task B, works on it for a while, and then switches back to task A.
If the time slices are small enough, it may appear to the user that both things are being run in parallel, even though they're actually being processed in serial by a multitasking CPU.
  So every Parallel program is Concorrent, but not every concurrent is parallel.

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.