Article title: Introduction to Linux and symmetric multiprocessing applications. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
As demonstrated by mainstream CPU vendors, multi-core processors are ready to occupy the desktop and embedded markets at any time. Multi-Processing brings about higher performance and new problems. This article will discuss how to use SMP for multi-processing and development of Linux®The idea behind the application.
You can use multiple methods to improve the performance of the Linux system. The most popular one is to improve the performance of the processor. An obvious solution is to use a processor with a faster clock frequency, but there is a physical limit for any specific technology, and the clock frequency has such a limit. When that limit is reached, you can use the "more, better" method to apply the multi-processor. Unfortunately, the performance of a multi-processor is not linearly proportional to the total and cost of a single processor.
Before discussing the multi-processing applications in Linux, let's take a quick look at the history of multi-processing.
Multi-Processing history
|
Flynn multi-CPU architecture classification
Single Instruction, Single Data (SISD) is a typical Single processor architecture. Multiple Instruction, Multiple Data (MIMD) Multi-Processing Architecture has some independent processors, each operating independent Data (control parallel ). Finally, Single Instruction, Multiple Data (SIMD) has a large number of processors (Data parallelism) that operate on different Data ). See the reference section below to obtain detailed information about the original Flynn file. |
|
Multi-Processing originated from some companies in the middle of 1950s, some of which you may know, and others you may not remember (IBM, Digital Equipment Corporation, Control Data Corporation ). In the early 1960s s, Burroughs Corporation introduced a symmetric MIMD multi-processor with four CPUs that can be connected to a maximum of sixteen memory modules (the first SMP architecture) through a cross switch ). In 1964, CDC 6600 was introduced. it was widely used and provided a CPU with ten sub-processors (peripheral processing units. At the end of 1960s, Honeywell released its first Multics system, which is another symmetric multi-processing system with eight CPUs.
While developing a multi-processing system, the use of various technologies also improves the ability to reduce the processor volume and run faster clock frequencies. In 1980s, Cray Research and other companies introduced multi-processor systems and UNIX-like®The operating system (CX-OS) to take advantage of these capabilities.
In the end of 1980s, with the prevalence of single-processor PC systems (such as IBM PCs), the use of multi-processing systems declined. However, more than two decades later, the use of symmetric multi-processing technology has returned to the PC system.
Amdahl's law
Gene Amdahl is a computer architect and IBM employee engaged in computer architecture development at IBM, Amdahl Corporation (an enterprise named after him), and some other companies. But the most famous is his law, which is used to predict the greatest expected system improvement after a part of the system is improved. It is mainly used to calculate the maximum theoretical performance improvement after multi-processor (see figure 1 ).
Figure 1. Amdahl's law for processor parallelization
Using the equation shown in Figure 1, you can calculate the maximum performance improvement of the system. N indicates the number of processors, and factor F specifies the part of the system that cannot be parallelized (that is, the part of the system that is essentially ordered ). Result 2 is displayed.
Figure 2. Amdahl's rule for up to 10 CPUs
The top line in Figure 2 shows the number of processors. Ideally, when you add another processor to solve the problem, you want to see this performance growth. Unfortunately, not all problems can be parallelized, and there are overhead for managing processors, so the speed improvement is not that great. The bottom (purple line) is an example of 90% processing order problems. In this figure, the best case is the Brown Line, which shows a 10% order (so 90% can be parallel) problem. Even in this case, the execution performance of the ten processors is only a little better than that of the five processors.
[1] [2] [3] [4] Next page