多核技术摘要

简介:
多核技术虽然在性能上比传统的uniprocessiing优越,但是在设计上有很多挑战。几个很明显的问题包括如何将不同应用负载到多cpu的问题和资源调度共享问题等等。诸如这些问题的考虑,多核设计上出现了AMP、SMP以及BMP架构。
Asymmetric multiprocessing (AMP):
clip_image001
A separate OS, or a separate instantiation of the same OS, runs on each CPU.
Some systems use asymmetric multiprocessing, in which each processor is assigned a specific task. A master processor controls the system; the other processors either look to the master for instruction or have predefined tasks. The scheme defines a master-slave relationship. The master processor schedules and allocates work to the slave processors.
With AMP, you decide how the shared hardware resources used by applications are divided up between the CPUs. Normally, this resource allocation occurs statically during boot time and includes physical memory allocation, peripheral usage, and interrupt handling. While the system could allocate the resources dynamically, doing so would entail complex coordination between the CPUs.
In an AMP system, a process always runs on the same CPU, even when other CPUs run idle. As a result, one CPU can end up being under- or overutilized. To address the problem, the system could allow applications to migrate dynamically from CPU to another. Doing so, however, can involve complex checkpointing of state information or a possible service interruption as the application is stopped on one CPU and restarted on another. Also, such migration is difficult, if not impossible, if the CPUs run different OSs.
Symmetric multiprocessing (SMP):
clip_image002
A single instantiation of an OS manages all CPUs simultaneously, and applications can float to any of them.
The most common systems use symmetric multiprocessing (SMP), in which each processor performs all tasks within the operating system. SMP means that all processors are peers; no master-slave relationship exists between processors.SMP(symmetric multiprocessing)is the processing of programs by multiple processors that share a common operating system and memory. In symmetric (or "tightly coupled") multiprocessing, the processors share memory and the I/O bus or data path. A single copy of the operating system is in charge of all the processors. SMP, also known as a "shared everything" system, does not usually exceed 16 processors.
Symmetric multiprocessing addresses the issue by running only one copy of Neutrino on all of the system's CPUs. Because the OS has insight into all system elements at all times, it can allocate resources on the multiple CPUs with little or no input from the application designer.
Bound multiprocessing (BMP):
A single instantiation of an OS manages all CPUs simultaneously, but each application is locked to a specific CPU.
As with SMP, a single copy of the OS maintains an overall view of all system resources, allowing them to be dynamically allocated and shared among applications. But, during application initialization, a setting determined by the system designer forces all of an application's threads to execute only on a specified CPU.
Compared to full, floating SMP operation, this approach offers several advantages:
  • It eliminates the cache thrashing that can reduce performance in an SMP system by allowing applications that share the same data set to run exclusively on the same CPU.
  • It offers simpler application debugging than SMP since all execution threads within an application run on a single CPU.
  • It helps legacy applications that use poor techniques for synchronizing shared data to run correctly, again by letting them run on a single CPU.
 
The most difference between AMP, SMP, and BMP as bellow:
  • AMP works well with legacy applications, but has limited scalability beyond two CPUs.
  • SMP offers transparent resource management, but software that hasn't been properly designed for concurrency might have problems.
  • BMP offers many of the same benefits as SMP, but guarantees that uniprocessor applications will behave correctly, greatly simplifying the migration of legacy software.









本文转自 chris_lee 51CTO博客,原文链接:http://blog.51cto.com/ipneter/369782,如需转载请自行联系原作者

目录
相关文章
|
数据可视化 关系型数据库 数据安全/隐私保护
Python 基于 Django 的学生成绩管理系统,可视化界面
Python 基于 Django 的学生成绩管理系统,可视化界面
|
10月前
|
人工智能 大数据 云计算
【AI系统】AI 发展驱动力
本文介绍了阿里云在2023年云栖大会上发布的多项新技术和产品,涵盖云计算、大数据、人工智能等领域,展示了阿里云最新的技术成果和行业解决方案,助力企业数字化转型。
|
监控 安全 物联网
5G技术的革命性进步及其对社会的影响
5G技术作为移动通信领域的革命性进步,正深刻地影响着我们的生活和社会。它不仅提供了更快的数据传输速率和更低的延迟,还将引领着各个领域的创新和发展。从移动通信、工业、医疗到智能城市,5G技术正在改变着我们的世界,为未来带来更多可能性。然而,我们也需要解决一些挑战,确保5G技术的安全和可持续发展。随着技术的不断进步,5G技术的前景依然充满希望,将为我们的社会带来更多的创新和变革。
1364 1
5G技术的革命性进步及其对社会的影响
|
数据采集 存储 JSON
C语言如何执行HTTP GET请求
C语言如何执行HTTP GET请求
|
缓存 Prometheus 监控
【Prometheus+Grafana系列】基于docker-compose搭建
本文主要介绍prometheus和grafana的基本功能,并使用docker-compose方式搭建了样例环境。
|
机器学习/深度学习 并行计算 PyTorch
【Pytorch】2022 Pytorch基础入门教程(完整详细版)
Pytorch是torch的python版本,是由Facebook开源的神经网络框架,专门针对 GPU 加速的深度神经网络(DNN)编程。Torch 是一个经典的对多维矩阵数据进行操作的张量(tensor )库,在机器学习和其他数学密集型应用有广泛应用。与Tensorflow的静态计算图不同,pytorch的计算图是动态的,可以根据计算需要实时改变计算图。但由于Torch语言采用 Lua,导致在国内一直很小众,并逐渐被支持 Python 的 Tensorflow 抢走用户。
1044 0
|
前端开发 JavaScript API
我学会了,写一个前端下载文件功能
过去有很多次文件下载的功能,但是都没有记录下来,这次有空就把文件下载的功能从0写一遍,于是就有了这篇文章。 我会从简到难的方式去实现下载功能。从直接下载字符串到简单请求下载文件,最终通过后端返回的文件名来实现动态下载文件。
896 0
我学会了,写一个前端下载文件功能
|
存储 数据采集 分布式计算
大数据数据采集的数据迁移(同步/传输)的Sqoop之数据传输实战
在大数据领域,数据迁移(同步/传输)也是非常重要的一环。Sqoop作为一个开源的数据迁移工具,可以帮助我们轻松地实现关系型数据库与Hadoop之间的数据迁移。本文将介绍如何使用Sqoop进行数据传输实战。
972 0
|
SQL 前端开发 关系型数据库
MySQL「 Every derived table must have its own alias」错误修复方法
在写带有子查询或者在查询时产生临时表的查询时,可能会出现这个错误: ERROR 1248 (42000): Every derived table must have its own alias意思是「每一个派生出来的表都必须给它命名一个自己的别名」
2610 0