多核技术摘要

多核技术虽然在性能上比传统的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,如需转载请自行联系原作者

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值