并行编程和多核编程有什么区别?

发布于 2024-10-04 08:22:15 字数 49 浏览 4 评论 0原文

我认为这个话题已经说明了一切。并行编程和多核编程之间有什么区别(如果有的话)?谢谢。

I think the topic says it all. What's the difference, if any, between parallel and multicore programming? Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

手长情犹 2024-10-11 08:22:15

多核是并行编程的一种。特别是,它是一种 MIMD 设置,其中处理单元不是分布式的,而是共享一个公共存储区域,如果需要的话甚至可以像 MISD 设置一样共享数据。我相信它甚至与多处理不同,因为多核设置可以共享某种级别的缓存,因此比不同核心上的 CPU 更有效地协作。

一般并行编程还包括 SIMD 系统(如 GPU)和分布式系统。

Mutli-core is a kind of parallel programming. In particular, it is a kind of MIMD setup where the processing units aren't distributed, but rather share a common memory area, and can even share data like a MISD setup if need be. I believe it is even disctinct from multi-processing, in that a multi-core setup can share some level of caches, and thus cooperate more efficiently than CPUs on different cores.

General parallel programing would also include SIMD systems (like your GPU), and distributed systems.

梦途 2024-10-11 08:22:15

区别不在于方法,而在于软件运行的硬件。并行编程正在解决一个问题并将工作负载分割成可以并行处理的更小的部分(分而治之类型的问题等)或可以彼此独立运行的函数。将该软件放置在多核硬件上,操作系统将对其进行优化以在不同的内核上运行。这使其具有更好的性能,因为您创建的用于执行并发工作的每个线程现在都可以在单个处理器/内核上运行,而无需消耗 CPU 周期。

The difference isn't in approach, just in the hardware the software runs on. Parallel programming is taking a problem and spliting the workload into smaller pieces that can be processed in parallel(Divide and Conquer type problems, etc.) or functions that can run independently of each other. Place that software on a multi-core piece of hardware and it will be optimized by the OS to run on the different cores. This gives it a better performance because each thread you create to do concurrent work can now run without consuming CPU cycles on a single processor/core.

許願樹丅啲祈禱 2024-10-11 08:22:15

多核系统是并行系统的子集。不同的系统将具有不同的内存架构,每个架构都有自己的挑战。一个系统如何处理缓存一致性?是否涉及NUMA等等

Multicore systems are a subset of parallel systems. Different systems will have different memory architectures, each with their own set of challenges. How does one system deal with cache coherency? Is NUMA involved, etc. etc.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文