前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >操作系统之SMP和AMP系统 原

操作系统之SMP和AMP系统 原

作者头像
克虏伯
发布2019-04-15 10:53:10
7.5K0
发布2019-04-15 10:53:10
举报

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

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

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

    如何查看我们的Linux是SMP还是AMP,如下List-1,参考博客《Linux确认工作在SMP环境中》

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

代码语言:javascript
复制
[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上的结果

代码语言:javascript
复制
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的主要特征如下:

  • 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的主要特征如下:

  • 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拥有自己的独立资源。这种结构最大的特点在于不共享资源。

    我们平时使用的机器基本都是SMP system,我目前还没有见过AMP system。

    所以为什么说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. https://blog.csdn.net/maochengtao/article/details/42583585
代码语言:txt
复制
 (adsbygoogle = window.adsbygoogle || []).push({});
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2018/06/29 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 1.Linux查看是否是处于SMP环境
  • 2.AMP和SMP的特征对比
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档