转自: http://www.vonwei.com/post/2outof52.html

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

Posted by David McCann,原文地址http://bristolcrypto.blogspot.com/2014/10/52-things-number-2-what-is-difference.html

同样先给出英文原文博客,再在后面给出翻译理解和补充。

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.

        

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.

        

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.

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.

下面是翻译与补充整理:

首先介绍并行计算,然后再介绍这两种处理器的区别。

什么是并行计算?先考虑传统的串行处理模式,假设需要解决某个问题,串行计算的方式是将该问题视为若干个步骤(或者指令),处理器使用顺序序列的方式处理这些指令,当所有指令处理完成之后会出现最终的问题结果,从而解决了问题。不过,串行处理方式在速度上存在瓶颈。当问题不是太大时,这种方式可行。但是,当处理大问题或者想要更快的计算更多事情,是否有能克服处理器速度瓶颈并增加计算速度的方法呢?答案就是并行计算。并行计算将要解决的问题分解为很多小问题,每个小问题可以被同时独立的进行计算。通过这种方式,问题分发给不同的处理元素,每个处理元素同步的执行其中一个子问题,会显著的增加计算的速度。速度增加量依赖算法,由阿姆达尔定律[1]确定。所有这一切是如何工作的,如何通过这种方式处理事件呢?两个很好的方案分别是多核处理器,和向量处理器。

什么是多核处理器?一个多核处理器是一个独立计算组件,通过使用多个串行处理器来执行并行计算,每个串行处理器执行一个不同的计算,这些计算同步进行。也就是说,一个大问题的每个子问题都由一个独立的处理器去计算以达到并行的效果。就像多个人执行一个大项目,每个人处理一个不同的任务,但都同时为同一个项目在作出贡献。这一点可能需要其他的组织来实现,不过项目的整体速度是加快了。

什么是向量处理器?向量处理器计算指令的方式与串行处理器一致,但是串行处理器只能处理单一数据集,而向量处理器可以直接操作一维数组(向量)指令集。其基本思路是,如果你正在一个程序中反复多次的做同一件事,每次使用不同的数据集,通常思路是对每个数据集执行一个独立的指令,向量处理器是对所有数据集只执行一次指令即可。SIMD(单指令多数据)通常用于表示指令按照这种方式工作。

相信大家对多核处理器都比较熟悉,对向量处理器陌生一点,下面列出维基百科关于向量处理器的解释[2]:“向量处理器,又称数组处理器,是一种实现了直接操作一维数组(向量)指令集的中央处理器(CPU)。这与一次只能处理一个数据的标量处理器正相反。向量处理器可以在特定工作环境中极大地提升性能,尤其是在数值模拟或者相似领域。向量处理器最早出现于20世纪70年代早期,并在70年代到90年代期间成为超级计算机设计的主导方向,尤其是多个克雷(Cray)平台。由于常规处理器设计性价比的快速下降,基于向量处理器的超级计算机在90年代末逐渐让出了主导地位。现在,绝大多数商业化的CPU实现都能够提供某种形式的向量处理的指令,用来处理多个(向量化的)数据集,也就是所谓的SIMD(单一指令、多重数据)。常见的例子有 VIS, MMX, SSE, AltiVec 和AVX。向量处理技术也能在游戏主机硬件和图形加速硬件上看到。在2000年,IBM,东芝和索尼合作开发了Cell处理器,集成了一个标量处理器和八个向量处理器,应用在索尼的PlayStation 3游戏机和其他一些产品中。其他CPU设计还可能包括多重指令处理多重(向量化的)数据集的技术——也就是所谓的MIMD(多重指令、多重数据)——并实现了VLIM。此类设计通常用于特定应用场合,而不是面向通用计算机的市场化产品。在富士通的 FR-V VLIW/vector处理器中,组合使用了两种技术。”

多核处理器和向量处理器有何不同?这里通过一个例子来说明,可以忘记上面描述的一切,记住这个例子即可。假设我们想要将四个大石头滚到马路的另一边,平均滚动每个石头需要花费1分钟。串行处理器会逐一的滚动每个石头,将花费4分钟时间。拥有两个核的多核处理器让两个人去滚石头,即每人滚两个,最终花费2分钟。向量处理器找一根长木板,放到四个大石头后面,推木板即可同时滚动四个石头,最终只需要1分钟。多核处理器相当于拥有多个工人,而向量处理器拥有一种方法,可以同时对多件事进行相同的操作。

[1] http://en.wikipedia.org/wiki/Amdahl%27s_law

[2]http://zh.wikipedia.org/wiki/%E5%B9%B6%E8%A1%8C%E5%90%91%E9%87%8F%E5%A4%84%E7%90%86%E6%9C%BA

多核处理器与向量处理器相关推荐

  1. [密码学基础][每个信息安全博士生应该知道的52件事][Bristol Cryptography][第2篇]多核处理器和向量处理器的区别

    从表面看来,你可能很困惑着两个处理器到底有什么区别.如果你熟悉并行计算的话,那么你可能会碰见这两种处理器.因此它们到底有什么区别?这个就是这周的问题.在我们进入细节之前,为什么我们不看看这两个不同的处 ...

  2. 多核处理器集成了神经处理单元

    多核处理器集成了神经处理单元 Multicore processor integrates neural processing unit NXP Semiconductors N.V.通过推出i.MX ...

  3. 《为什么在多核处理器下需要内存屏障(MenmoryBarrier)?》

    <为什么在多核处理器下需要内存屏障(MenmoryBarrier)?> 因为CPU的乱序执行技术虽然可以极大的提高流水线的工作效率,但是导致了实际运行次序和program的次序不一致,如果 ...

  4. 嵌入式ARM多核处理器并行化方法

    from:http://ee.ofweek.com/2014-11/ART-11001-2808-28902672.html 目前,嵌入式多核处理器已经在嵌入式设备领域得到广泛运用,但嵌人式系统软件开 ...

  5. ITK:对多个线程上的数据进行操作以利用多核处理器

    ITK:对多个线程上的数据进行操作以利用多核处理器 ITK:对多个线程上的数据进行操作以利用多核处理器 内容提要 结果 C++实现代码 ITK:对多个线程上的数据进行操作以利用多核处理器 内容提要 内 ...

  6. 多核处理器_多核处理器还能走多远?2050年用上1024核CPU

    随着锐龙Threadripper 3990X处理器的上市,AMD在桌面处理器上也带来了64核128线程处理器了,这是目前最强大的桌面CPU,甚至短时间内都没可能有竞品超过它了. 想想两三年前,市面上的 ...

  7. XP计算机里改单核,XP中多核处理器只显示单核

    为什么XP中多核处理器会只显示单核呢?是什么原因呢?下面是学习啦小编收集整理的XP中多核处理器只显示单核,希望对大家有帮助~~ XP中多核处理器只显示单核 1.右键我的电脑--属性 --硬件--设备管 ...

  8. 批处理系统,分时系统,分布式系统,多处理/多核处理器系统,集群系统,嵌入式操作系统

    批处理系统:用户 将一批作业 提交操作系统 后就不再干预,由操作系统控制它们自动运行. 单批处理系统: 多道批处理系统: 单道程序设计:简单来说就是把作业按照顺序完成.CPU的利用率较低. 多道程序设 ...

  9. 计算机组成原理 — CPU — 多核处理器体系结构

    目录 文章目录 目录 单处理器架构与多处理器架构 CPU 超线程技术 多核处理器架构 SMP 对称多处理架构 NUMA 非统一内存访问结构处理器架构 MPP 大规模并行处理器架构 单处理器架构与多处理 ...

最新文章

  1. Linux开发板怎么用madplay,Linux中madplay 音乐播放器移植步骤
  2. JAVA Future
  3. BZOJ4543/BZOJ3522 [POI2014]Hotel加强版(长链剖分)
  4. 【模拟】谁拿了最多奖学金
  5. 【2016 Asia China-Final D题】
  6. 使用before、after伪类制作三角形
  7. linux进程增删改查,iptables的增删改查
  8. 信息学奥赛一本通 1414:【17NOIP普及组】成绩 | 洛谷 P3954 [NOIP2017 普及组] 成绩
  9. PRML-系列一之1.2.4
  10. mysql.sys_MySQL sys Schema
  11. 能够做到这10点,成功将离你不远
  12. HDU 5025 Saving Tang Monk
  13. 《架构即未来》笔记1——概述全书内容
  14. openwrt 19 overlay 空间不足_新桥胡同拆除19处违建!背街小巷“瘦身”后宽敞多了...
  15. Mysql 10位 13位时间戳对比现在时间 时间对比查询
  16. 资源小屋(更新ing.......)
  17. 重庆APP开发价格费用如何计算?
  18. zynq7000 资源介绍
  19. SpringBoot数据库访问异常HikariPool-1 - Exception during pool initialization.
  20. java 线程池超时_线程池中如何控制超时时间?

热门文章

  1. 斯托克斯公式(Stokes' theorem)
  2. 小型步进电机驱动芯片的应用和介绍如HR8833
  3. 高分子化学靠自己的记忆(更新中)
  4. i5 11600kf和i7 11700kf 哪个好
  5. 删除重复数据和删除所有重复数据不同处理方法
  6. 能否构成三角形的条件代码_灵活运用全等三角形寻找线段间的数量关系
  7. 苹果cmsv10粉色风格网站模板_WAP源码
  8. 20221225英语学习
  9. POJ 3278 / hdu 2717 Catch That Cow (广搜)
  10. 邮件合并功能:使用Excel批量生成word内容