操做系統之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
相關文章
相關標籤/搜索