操做系统之SMP和AMP系统

    SMP——Symmetric Multi-Processing (SMP),即对称多处理器结构ubuntu

    AMP——Asymmetric Multi-Processing (AMP) ,非对称多处理器结构bash

1.Linux查看是不是处于SMP环境

    如何查看咱们的Linux是SMP仍是AMP,以下List-1,参考博客《Linux确认工做在SMP环境中》架构

    List-1 "uname -a"命令的结果中含有SMP,这是个人CentOS7 64bits上的结果 dom

[dmj@localhost ~]$ uname -a
Linux localhost.localdomain 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

    List-2 "uname -a"命令的结果中含有SMP,这是个人Ubuntu16 64bits上的结果ide

dmj@ubuntu:~$ uname -a
Linux ubuntu 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

2.AMP和SMP的特征对比

    AMP system的主要特征以下:this

  • multiple CPUs
  • each of which may be a different architecture [but can be the same]
  • each has its own address space
  • each may or may not run an OS [and the OSes need not be the same]
  • some kind of communication facility between the CPUs is provided

    SMP system的主要特征以下:spa

  • multiple CPUs
  • each of which has the same architecture
  • CPUs share memory space [or, at least, some of it]
  • normally an OS is used and this is a single instance that runs on all the CPUs, dividing work between them
  • some kind of communication facility between the CPUs is provided [and this is normally shared memory]

    SMP的特征是:只有一个操做系统实例,运行在多个CPU上,每一个CPU的结构都是同样的,内存、资源共享。这种系统有一个最大的特色就是共享全部资源。操作系统

    AMP的特征是:多个CPU,各个CPU在架构上不同,每一个CPU内核运行一个独立的操做系统或同一操做系统的独立实例,每一个CPU拥有本身的独立资源。这种结构最大的特色在于不共享资源。.net

    咱们平时使用的机器基本都是SMP system,我目前尚未见过AMP system。code

    因此为何说Java的伪共享在SMP系统上严重,经过SMP系统的特性能够明白——由于SMP系统共享资源,关于伪共享,能够查看个人另外一篇博客

 

Reference:

  1. http://scitechconnect.elsevier.com/asymmetric-multi-processing-amp-vs-symmetric-multi-processing-smp/
  2. https://blog.csdn.net/honour2sword/article/details/45248121
  3. http://www.javashuo.com/article/p-zvzhkjui-bo.html
相关文章
相关标签/搜索