码迷,mamicode.com
首页 > 其他好文 > 详细

并行parallel和并发concurrent的区别

时间:2016-08-25 20:25:59      阅读:127      评论:0      收藏:0      [点我收藏+]

标签:

http://stackoverflow.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

 

并行parallel和并发concurrent的区别

标签:

原文地址:http://www.cnblogs.com/chucklu/p/5808080.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!