من قبل
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.