并行parallel和并发concurrent的区别

http://*.com/questions/1050222/concurrency-vs-parallelism-what-is-the-difference

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.

Parallelism is when tasks literally run at the same time, eg. on a multicore processor.

Quoting Sun's Multithreaded Programming Guide:

  • 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.

  • Parallelism: A condition that arises when at least two threads are executing simultaneously.

参考:

http://www.cnblogs.com/ty408/p/5801148.html

上一篇:在MVC中写Filter时经常filterContext无法代码提示HttpContext的方法和属性的原因


下一篇:A neural chatbot using sequence to sequence model with attentional decoder. This is a fully functional chatbot.