并行性的量化指标 [英] Quantitative metrics for parallelism

查看:108
本文介绍了并行性的量化指标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hwang在《高级计算机体系结构》一书中描述了一些参数,例如,加速,效率,冗余,利用率和质量,如下图所示.

Some parameters have been described in the Advanced computer architecture book by Hwang, e.g Speedup, Efficiency, Redundancy, Utilization and Quality as shown in the picture below.

我了解全部,部分了解最后一个参数,质量.问题是,为什么质量与冗余度成反比关系.如前所述,冗余显示了软件并行性和硬件之间的匹配.例如,一个处理器运行一条单元指令,因此O(1)= 1.

I understand all and partially understand the last parameter, quality. The question is, why quality has inverse relationship with the redundancy. As said, redundancy shows the matching between software parallelism and the hardware. For example, one processor runs one unit instruction, therefore, O(1)=1.

通过O(n)我们实际上增加了处理器的数量,因此单位操作增加并且上限为n.所以,那很好!是吗?

By O(n) we are actually increasing the number of processors, so the unit operation increases and the upper bound is n. So, that is good! in't it?

但是根据质量指标,如果我们增加冗余度,质量就会下降.也许有些词的定义在这里是模棱两可的.

But according to the quality metric, if we increase the redundancy, the quality decreases. Maybe some word definitions are ambiguous here.

有什么想法吗?

推荐答案

我认为人们误解了O(n),这是所有处理器在整个执行期间执行的单位操作的总数.这没有上限,并且O(1)不一定(并且实际上不是)1;这取决于应用程序.与在单处理器上执行应用程序相比,如果我们必须执行更多操作以在n个处理器上并行化应用程序(即,冗余度大于1),那么这是一件不好的事,并且冗余度越大,软件与软件之间的失配就越大.硬件并行性.理想情况下,冗余度是1.因此,如果要将速度,效率和冗余合并为一个质量指标,则速度和效率应在分子中,而冗余应在分母中.

I think misunderstood O(n), which is the total number of unit operations performed by all processors for the whole execution duration. This has no upper bound and O(1) is not necessarily (and realistically is not) 1; it depends on the application. If we had to do more operations to parallelize the application on n processors compared to executing it on a uniprocessor (i.e., the redundancy is larger than 1), then this is bad a thing and the larger the redundancy the greater the mismatch between software and hardware parallelism. Ideally, the redundancy is 1. Therefore, if we want to combine the speedup, efficiency, and redundancy into a single quality metric, speedup and efficiency should be in the numerator and the redundancy should be in the denominator.

值得注意的是,本书中提到的这些指标的大多数上限和下限在现代处理器上都过于简单.它们在简单(标量)处理器上最有意义.但是,在现代多核系统上,它们无法准确捕获现实中可能发生的情况.例如,两处理器系统上的加速可能低于1或高于2.冗余不仅取决于ISA,而且取决于编译器.因此它可以小于1或大于2.尽管指标本身仍然非常有用.

It's worth noting that most of the upper and lower bounds on these metrics as mentioned in the book are too simplistic on modern processors. They make most sense on simple (scalar) processors. However, on a modern multicore system, they don't capture accurately what may happen in reality. For example, the speedup on a 2-processor system could be lower than 1 or higher than 2. The redundancy depends not only on the ISA but also on the compiler. So it can be smaller than 1 or larger 2. Although the metrics themselves can still be very useful.

这篇关于并行性的量化指标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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