What's the difference between parallel and concurrent?

本文探讨了Java中垃圾回收的不同算法,包括并行性和并发性的概念。介绍了默认的并行收集器、CMS收集器以及G1收集器的特点。并行收集器仅利用多线程进行并行处理但不与应用程序线程并发;CMS收集器既并行也部分并发;而G1收集器则实现了高度的并行与大部分时间的并发执行。

For java, http://drdobbs.com/article/print?articleId=219401061&dept_url=/java/

Parallelism and Concurrency

When speaking about garbage collection algorithms, parallelism describes the collector's ability to perform its work across multiple threads of execution. Concurrency describes its ability to do work while application threads are still running. Hence, a collector can be parallel but not concurrent, concurrent but not parallel, or both parallel and concurrent.

The Java parallel collector (the default) is parallel but not concurrent as it pauses application threads to do its work. The CMS collector is parallel and partially concurrent as it pauses application threads at many points (but not all) to do its work. The G1 collector is fully parallel and mostly concurrent, meaning that it does pause applications threads momentarily, but only during certain phases of collection. For more information on garbage collection, and common algorithms used, read my latest book entitled Real-Time Java Programming with Java RTS, available from Pearson Publishing.

—EJB



https://blogs.oracle.com/yuanlin/entry/concurrency_vs_parallelism_concurrent_programming





http://www.quora.com/What-is-the-exact-difference-between-parallel-and-concurrent-programming


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值