Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

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 ajoutée par Utilisateur supprimé
Date de publication: 2013/08/22
Muhammed Sallout
par 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

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?