简体   繁体   English

并行性的量化指标

[英]Quantitative metrics for parallelism

Some parameters have been described in the Advanced computer architecture book by Hwang, eg Speedup, Efficiency, Redundancy, Utilization and Quality as shown in the picture below. Hwang在Advanced Computer Architecture一书中描述了一些参数,例如Speedup,Effective,Redundancy,Utilization和Quality,如下图所示。

在此处输入图片说明

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(1)= 1。

By O(n) we are actually increasing the number of processors, so the unit operation increases and the upper bound is n. 通过O(n),我们实际上增加了处理器的数量,因此单位操作增加并且上限为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. 也许有些单词的定义在这里不明确。

Any thought? 任何想法?

I think misunderstood O(n), which is the total number of unit operations performed by all processors for the whole execution duration. 我认为误解为O(n),这是所有处理器在整个执行期间执行的单位操作的总数。 This has no upper bound and O(1) is not necessarily (and realistically is not) 1; 这没有上限,并且O(1)不一定(并且实际上不是)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 (ie, 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. 与在单处理器上执行应用程序相比,如果我们必须执行更多操作以在n个处理器上并行化应用程序(即,冗余度大于1),那么这是一件不好的事,并且冗余度越大,软件与软件之间的失配就越大。硬件并行性。 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。因此,如果我们要将加速,效率和冗余合并为一个质量指标,则加速和效率应在分子中,而冗余应在分母中。

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. 例如,两处理器系统上的加速可能低于1或高于2。冗余不仅取决于ISA,而且取决于编译器。 So it can be smaller than 1 or larger 2. Although the metrics themselves can still be very useful. 因此它可以小于1或大于2。尽管指标本身仍然非常有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM