Symmetric Multiprocessing (SMP) und Asymmetric Multiprocessing (AMP)


Bei Mehrkernprozessoren unterscheidet man zwischen symmetrisch aufgebauten Mehrkernprozessoren, den Symmetric Multiprocessor (SMP) und den Asymmetric Multiprocessors (AMP).

Während sich bei symmetrische Mehrkernprozessoren die einzelnen Prozessoren das Betriebssystem und den gemeinsamen Adressraum des Hauptspeichers teilen, sind bei die bei den asymmetrischen Mehrkernprozessoren die Prozessorkerne voneinander entkoppelt. Jeder Prozessorkern hat seine eigene Software und bearbeitet Anwendungen eigenständig und unabhängig von anderen Prozessorkernen. Entscheidend für die Rechenleistung ist die Leistung eines einzelnen Prozessorkerns.

Typischerweise wird SMP verwendet, wenn eine eingebettete Anwendung einfach mehr CPU-Leistung benötigt, um ihre Arbeitslast zu bewältigen, ähnlich wie Mehrkern-CPUs in Desktop-Computern verwendet werden.

AMP wird am ehesten verwendet, wenn unterschiedliche CPU-Architekturen für bestimmte Aktivitäten optimal sind – wie ein DSP und eine MCU. In einem AMP-System besteht die Möglichkeit, auf jedem Kern ein anderes Betriebssystem bereitzustellen.

Using SMP

Symmetric multiprocessor systems typically are used in high end computing. These computing environments require large amounts of computing power to perform application tasks and processes. Most multiprocessor systems use the SMP architecture. SMP is most useful for time-sharing and multi-threaded time-sharing systems. Time sharing is the distribution of computing resources to multiple users simultaneously. Similarly, multithreading is a feature of the central processing unit (CPU) that allows a single process to perform multiple tasks simultaneously. More specifically, multithreading allows multiple threads of instructions to execute independently, all sharing the same processing resources. Timesharing operating systems also use SMP. This is because computing resources can be distributed among multiple users and multiple processes can run in parallel. This process is supported by SMP, which is designed to run multiple processes on different processing units. SMP is multithreaded for the same reason. This is because multithreading handles multiple processes simultaneously, and SMP divides the threads among each processor. However, SMP is generally not used on PCs or applications that have not been modified for multithreaded programming. Applications and programs should be designed to allow multithreading. This allows threads to be scheduled on different parallel processors.

Sharing memory space and I/O with different CPUs with SMP

SMP: Symmetric Multiprocessing in Industrial Linux applications – Linux utilizes multiple CPU Cores

SMP: Symmetric Multiprocessing in Industrial Hypervisor based solutions – RT-Linux utilizes multiple CPU Cores

Using AMP

Traditional uniprocessor systems provide an execution environment that asymmetric multiprocessing do in a similar way. It provides a relatively easy way to port legacy code and provides a direct mechanism for controlling CPU usage. In most cases you can work with standard debugging tools and techniques. AMPs are either homogeneous (each CPU running the same type and version of operating system) or heterogeneous (each CPU running a different operating system or a different version of the same operating system). Furthermore, AMP is most likely to be used when different CPU architectures are optimal for specific activities - like a DSP and an MCU. In an AMP system, there is an opportunity to deploy a different operating system on each core.

If your operating system supports a particular distributed programming model, you can take full advantage of multiple CPUs in a homogeneous environment. Applications that run on a specific CPU will be able to communicate transparently with applications and system services (e.g., protocol stacks, device drivers) on other CPUs, without the high CPU load imposed by traditional interprocessor communication. In heterogeneous systems, you must either choose two OSs that share a common infrastructure (likely IP based) or implement a proprietary communications scheme for interprocessor communications. The OSs should also provide mechanisms for accessing shared hardware components to help avoid resource conflicts. With AMP, the shared hardware resources used by applications have to be divided up between the CPUs. Resources like peripherals, physical memory as well as interrupt handling typically is allocated statically during boot time. Allocating the resources dynamically would lead to complex coordination between the CPUs. In an AMP system, even when other CPUs run idle, a process always runs on the same CPU. As a result, the CPU can be starved or overloaded. To address this issue, systems can allow applications to dynamically migrate from one CPU to another. However, this can involve complex checkpointing of state information, which can disrupt service if an application is stopped on one CPU and restarted on another. Also, if the CPUs are running different operating systems, such a migration would be difficult, if not impossible.

Partitioning memory space and I/O with different CPUs with AMP

AMP: Asymmetric Multiprocessing in Industrial Linux applications – Multiple Linux instances

AMP: Asymmetric Multiprocessing in Industrial Hypervisor based solutions – Multiple RT-Linux instances