并发程序、并行程序和分布式程序的区别

发布于 2024-12-10 03:56:45 字数 237 浏览 0 评论 0原文

我刚刚进行编程结构研究;特别是我正在研究并发程序。我读过几篇文章,其中并发程序、并行程序和分布式程序之间的区别似乎令人困惑。

我的理解如下:

并发程序:同时执行多个任务或给出这样做的概念

并行程序:解决此类问题的算法允许同时执行一些相关任务

分布式程序:更多地与可用资源多于相应算法中固有的并行性。不止一种计算资源可用于解决该问题。

有人可以指出我对这些术语的正确和详细的解释吗?

I was just going through programming structure studies; In particular I was studying concurrent programs. I came across few articles where distinction between concurrent programs, parallel programs and distributed programs seems confounding.

My understanding is as follows:

concurrent programs : performs several tasks at the same time or gives a notion of doing so

parallel programs : algorithms for solving such problems allow some related tasks to be executed at the same time

distributed programs: Has more to do with available resources than inherent parallelism in the corresponding algorithm. More than one computing resource is available to solve the problem.

Could someone please point me to correct and detailed explanation of these terms?

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

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

发布评论

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

评论(1

回忆追雨的时光 2024-12-17 03:56:45

这些术语确实相关,有时甚至重叠:
并行编程是并发编程的一个子集,旨在使用多个并发执行的实体(线程、进程)来加速某些计算。
分布式计算是一个非常广泛的主题,正如您所说,它侧重于使用资源来解决问题。这些资源可以位于同一台机器上,也可以在地理上分散或异构。并行计算和分布式计算之间很难划清界限。并行计算可能是分布式的,也可能不是分布式的,具体取决于所使用的资源,而分布式计算可能会或可能不会用于并行解决问题。

在我看来,这些术语之间的微妙区别来自于考虑它们的抽象层。当主要焦点是单独的计算实体在某些共享数据上的交互时,我们就讨论并发编程。当关键方面是通过使用多个计算单元来加速计算时,我们就有了并行计算。最后,如果重点是管理资源来解决某些问题的方式,那么我们正在谈论分布式计算。

These terms are indeed related and sometimes overlapping:
Parallel programming is a subset of concurrent programming that aims to use several concurrently executing entities (threads, processes) in order to speedup some computation.
Distributed computing is a very wide topic that, as you said, focuses on using resources to solve a problem. These resources can be on the same machine, or can be geographically dispersed or heterogeneous. It is hard to draw a clear line between parallel and distributed computing. Parallel computing may or may not be distributed, depending on the resources used, while distributed computing may or may not be used to solve a problem in parallel.

In my opinion, the subtle distinction between these terms comes from the abstraction layers at which they are considered. When the main focus is the interaction of separate computational entities over some shared data, then we talk about concurrent programming. When the key aspect is speeding up a computation by using several computational units, we have parallel computing. Finally, if the focus is on the way resources are managed to solve some problem, then we are talking about distributed computing.

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