3 ms·
Concurrency: you have at least two threads sharing control of one CPU. Only one thread runs at a time. There is no parallelism. The important thing is that mult
by msie 12y ago
Concurrency: you have at least two threads sharing control of one CPU. Only one thread runs at a time. There is no parallelism. The important thing is that multiple threads are running.
Parallelism: the two threads are running simultaneously on two CPUs. There is concurrency too since there are multiple threads.
- kazinator 12y agoThe two situations you describe are more accurately called multitasking and multiprocessing. The latter gives us the "MP" in "SMP". > Concurrency: [...] There is no parallelism. > Parallelism: [...] There is concurrency too since ... Oops, contradiction! :)
- msie 12y agoYa got me there. :) Edit: I should have written more clearly that having concurrency doesn't imply parallelism.