什么挑战促进并行/并发架构的使用? [英] What challenges promote the use of parallel/concurrent architectures?

查看:166
本文介绍了什么挑战促进并行/并发架构的使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对使用内置并行/并发语言的可能性感到非常兴奋,例如 stackless python a>和 erlang ,并坚信我们都必须朝着这个方向前进太长 - 或者会想要,因为它将是一个好/容易的方式来获得可扩展性和性能。

I am quite excited by the possibility of using languages which have parallelism / concurrency built in, such as stackless python and erlang, and have a firm belief that we'll all have to move in that direction before too long - or will want to because it will be a good/easy way to get to scalability and performance.

但是,我习惯于以线性/串行/ OOP /功能的方式来思考解决方案,我正在努力以任何方式优点使用并发。我怀疑我只是需要不知道很多,但我想我会问如下:

However, I am so used to thinking about solutions in a linear/serial/OOP/functional way that I am struggling to cast any of my domain problems in a way that merits using concurrency. I suspect I just need to unlearn a lot, but I thought I would ask the following:


  • 你实现任何合理大的无堆栈或erlang还是其他?

  • 为什么是不错的选择?这是一个好的选择吗?

  • 您的问题的什么特征意味着并发/并行是正确的?

  • 您重新投放了一个新的问题利用并发/并行性?

  • Have you implemented anything reasonably large in stackless or erlang or other?
  • Why was it a good choice? Was it a good choice? Would you do it again?
  • What characteristics of your problem meant that concurrent/parallel was right?
  • Did you re-cast an exising problem to take advantage of concurrency/parallelism? and
  • if so, how?

任何人愿意分享的任何体验?

Anyone any experience they are willing to share?

推荐答案

在过去,当台式机只有一个CPU,并行化只适用于特殊并行硬件。但是这些天,桌面通常有2到8个核心,所以现在的并行硬件是标准。这是一个很大的区别,因此不只是关于哪些问题建议并行,而且如何应用并行性到一个更广泛的问题比以前。

in the past when desktop machines had a single CPU, parallelization only applied to "special" parallel hardware. But these days desktops have usually from 2 to 8 cores, so now the parallel hardware is the standard. That's a big difference and therefore it is not just about which problems suggest parallelism, but also how to apply parallelism to a wider set of problems than before.

为了利用并行性,你通常需要在某些方面重写你的问题。并行性在许多方面改变了操场:

In order to be take advantage of parallelism, you usually need to recast your problem in some ways. Parallelism changes the playground in many ways:


  • 您获得数据一致性和锁定问题。因此,您需要尝试组织您的问题,以便具有可以由不同线程,进程和计算节点处理的半独立数据结构。

  • 并行性还可以引入非确定性添加到您的计算中,如果并行组件执行其作业的相对顺序会影响结果。

  • 当您超越主板内部并行性并进入联网/集群/网格时,您可能需要防范这种情况,并定义一个并行版本的算法,计算,您还会遇到网络带宽,网络故障和正常管理失败的计算节点的问题。您可能需要修改您的问题,以便更容易处理当网络节点故障时部分计算丢失的情况。

  • You get the data coherence and locking problems. So you need to try to organize your problem so that you have semi-independent data structures which can be handled by different threads, processes and computation nodes.
  • Parallelism can also introduce nondeterminism into your computation, if the relative order in which the parallel components do their jobs affects the results. You may need to protect against that, and define a parallel version of your algorithm which is robust against different scheduling orders.
  • When you transcend intra-motherboard parallelism and get into networked / cluster / grid computing, you also get the issues of network bandwidth, network going down, and the proper management of failing computational nodes. You may need to modify your problem so that it becomes easier to handle the situations where part of the computation gets lost when a network node goes down.

这篇关于什么挑战促进并行/并发架构的使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆