Friday 8 July 2016

Parallelism vs Concurrency

Parallelism
Parallelism means that an application splits its tasks up into smaller subtasks which can be processed in parallel, for instance on multiple CPUs at the exact same time.



Example: If a person is listening to music while writing an assignment then work done is in parallel way.

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.

If the computer only has one CPU the application may not make progress on more than one task at exactly the same time, but more than one task is being processed at a time inside the application. It does not completely finish one task before it begins the next.




Example: If a person is watching TV while writing an assignment then work done is in concurrent way.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...