首页 > 其他分享 >52 Things: Number 2: What is the difference between a multi-core processor and a vector processor?

52 Things: Number 2: What is the difference between a multi-core processor and a vector processor?

时间:2024-04-11 12:59:50浏览次数:23  
标签:core What two vector 处理器 problem processor

52 Things: Number 2: What is the difference between a multi-core processor and a vector processor?

52 件事: 数字 2:多核处理器和矢量处理器有什么区别?

On the face of it, you may be confused as to what the difference is between these two processors. After all, you may be familiar with words like parallel computing and come across these two different types of processor. So what are the differences between them? This is the question of this week’s 52Things Every Cryptography PhD Student should know. But before we get into the nitty gritty of it, why don't we first have a look at the concept these two different processors are part of, namely parallel computing.
从表面上看,您可能会对这两个处理器之间的区别感到困惑。毕竟,您可能熟悉并行计算之类的词,并遇到过这两种不同类型的处理器。那么它们之间有什么区别呢?这是本周每个密码学博士生都应该知道的 52Things 的问题。但在我们深入了解它的本质之前,我们为什么不先看看这两个不同的处理器所包含的概念,即并行计算。

What is parallel computing?

什么是并行计算? Before answering this question we first need to consider the conventional “serial” model of processing. Let's do so by imagining some problem we need to solve. The way serial computing solves this problem is by viewing it as a number of steps (instructions) which the processor deals with in sequential order. The processor deals with each of the instructions and then at the end, the answer comes out and the problem is solved. Whilst being a wonderful way of solving the problem it does however imply a bottleneck in the speed of solving it. Namely, the speed of the processor at executing the individual instructions. This is fine if the problem isn’t too large, but what happens when we have to deal with larger problems or want to compute things faster? Is there a way of increasing the speed of computation without the bottleneck of the speed of the processor?
在回答这个问题之前,我们首先需要考虑传统的“串行”处理模型。让我们通过想象一些我们需要解决的问题来做到这一点。串行计算解决这个问题的方法是将其视为处理器按顺序处理的多个步骤(指令)。处理器处理每条指令,然后在最后,答案出来,问题得到解决。虽然这是解决问题的绝妙方法,但它确实意味着解决问题的速度存在瓶颈。即处理器执行单个指令的速度。如果问题不是太大,这很好,但是当我们必须处理更大的问题或想要更快地计算时会发生什么?有没有办法在不出现处理器速度瓶颈的情况下提高计算速度?   The answer as you might have guessed is yes and it comes in the form of something called parallel computing. What parallel computing does to the problem we are trying to solve is to break it down into smaller problems, each of which can be computed separately at the same time. In this way, the problem is distributed over different processing elements which perform each of these different sub problems simultaneously, providing a potentially significant increase in speed of computation – the amount of speed up depends on the algorithm and can be determined by Amdahl's law [1]. So how does this all work? How can you process things in such a way as this? Well two solutions to the problem are multi-core and vector processors.
正如您可能已经猜到的那样,答案是肯定的,它以并行计算的形式出现。并行计算对我们试图解决的问题的作用是将其分解为更小的问题,每个问题都可以同时单独计算。通过这种方式,问题分布在不同的处理元素上,这些处理元素同时执行这些不同的子问题,从而潜在地显着提高计算速度——加速的程度取决于算法,并且可以通过阿姆达尔定律[1]确定。那么这一切是如何运作的呢?你怎么能以这种方式处理事情?这个问题的两种解决方案是多核处理器和矢量处理器。

What is a multi-core processor?

什么是多核处理器? A multi-core processor is a single computing component that carries out parallel computing by using multiple serial processors to do different things at the same time. The sub problems of the bigger problem discussed earlier are each solved by a separate processor allowing programs to be computed in parallel. It's like having multiple people working on a project where each person is given a different task to do, but all are contributing to the same project. This might take some extra organising to do, but the overall speed of getting the project completed is going to be faster.
多核处理器是通过使用多个串口处理器同时执行不同操作来执行并行计算的单个计算组件。前面讨论的更大问题的子问题都由一个单独的处理器解决,允许并行计算程序。这就像让多个人在一个项目上工作,每个人都被赋予不同的任务,但所有人都在为同一个项目做出贡献。这可能需要一些额外的组织工作,但完成项目的整体速度会更快。

What is a vector processor?

什么是矢量处理器? A vector processor is a processor that computes single instructions (as in a serial processor) but carries them out on multiple data sets that are arranged in one dimensional arrays (unlike a standard serial processor which operates on single data sets). The idea here is that if you are doing the same thing many times to different data sets in a program, rather than executing a single instruction for each piece of data why not do the instruction to all the sets of data once? The acronym SIMD (Single Instruction Multiple Data) is often used to denote instructions that work in this way.
向量处理器是一种计算单个指令(如串行处理器)的处理器,但在排列在一维数组中的多个数据集上执行它们(与对单个数据集运行的标准串行处理器不同)。这里的想法是,如果你对程序中的不同数据集多次做同样的事情,而不是对每条数据执行一条指令,为什么不对所有数据集执行一次指令呢?首字母缩略词 SIMD(单指令多数据)通常用于表示以这种方式工作的指令。

What is the difference?

有什么区别? So that's the general idea, let's sum up with an example. Let's say we want roll 4 big stones across a road and it takes one minute to do each roll. The serial processor rolls them one by one and so takes four minutes. The multi core processor with two cores has two people to roll stones so each one rolls two stones, it takes two minutes. The vector processor gets a long plank of wood, puts it behind all four stones and pushes them all in one, taking one minute. The multi core processor has multiple workers, the vector processor has a way of doing the same thing to multiple things at the same time.
这就是总体思路,让我们用一个例子来总结一下。假设我们想在马路上滚动 4 块大石头,每次滚动需要一分钟。串行处理器将它们一个接一个地滚动,因此需要四分钟。两核的多核处理器有两个人滚石头,所以每个人滚两块石头,需要两分钟。矢量处理器获取一块长木板,将其放在所有四块石头后面,然后将它们全部推入一体,只需一分钟。多核处理器有多个工作线程,矢量处理器有一种同时对多个事物做同一件事的方法。  

标签:core,What,two,vector,处理器,problem,processor
From: https://www.cnblogs.com/3cH0-Nu1L/p/18104645

相关文章