http://stackoverflow.com/questions/1050222/concurrency-vs-parallelism-what-is-the-differencehtml
Concurrency is when two or more tasks can start, run, and complete in overlapping time periods. It doesn't necessarily mean they'll ever both be running at the same instant. Eg. multitasking on a single-core machine.oracle
Parallelism is when tasks literally run at the same time, eg. on a multicore processor.app
Quoting Sun's Multithreaded Programming Guide:ide
Concurrency: A condition that exists when at least two threads are making progress. A more generalized form of parallelism that can include time-slicing as a form of virtual parallelism.oop
Parallelism: A condition that arises when at least two threads are executing simultaneously.ui
參考:this
http://www.cnblogs.com/ty408/p/5801148.html3d
http://www.cnblogs.com/zlcxbb/p/5754346.htmlcode
https://www.codeproject.com/Articles/1267757/Concurrency-vs-Parallelismorm
This article will explain the difference between concurrency and parallelism. Concurrency vs parallelism has been a debated topic for a long time.
Technical vocabulary in IT industry is sometimes very confusing and 「Concurrency」 and 「Parallelism」 are some of them. Many developers think 「Concurrency and parallelism means executing at the same time」 which is right 50%, but with one big difference:
Feel of parallelism means you execute multiple tasks on the same core and the core switches context between tasks and serves them. You can also term this has time slicing / overlapping time period because your single core is just dedicating some time to one task and then some time to other.
Actual parallelism means you execute multiple tasks on multiple cores parallely.
Note: 「Concurrency is a broader term and Parallelism is a subset of it」.
Mapping to the real world, the left image depicts parallelism the right image depicts concurrency.
In order to achieve actual parallelism, we need dedicated cores, separate memory and so on. Let’s say we want to show a progress bar for some task completed. Now we really do not want to have separate cores allocated to display the progress. |
We do not want PERFORMANCE here, we want that physiologically the end user feels both tasks are happening simultaneously.
We want to just beat the human eye capability of 100 FPS and give an illusion of parallelism without stressing our computer resources. But let’s say we want to process big Excel files with a million records, then yes we would love to have actual parallelism to achieve performance.