多核技術摘要

多核技術雖然在性能上比傳統的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.
 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章