工程师 - 什么是SMP

什么是 SMP(对称多处理)?

What is SMP (symmetric multiprocessing)?

对称多处理(SMP,symmetric multiprocessing)是由多个处理器完成的计算机处理过程,这些处理器共享一个操作系统(OS)和内存。在对称多处理中,处理器共享相同的输入/输出(I/O)总线或数据路径。操作系统的单一副本负责管理所有处理器。

SMP (symmetric multiprocessing) is computer processing done by multiple processors that share a common operating system (OS) and memory. In symmetric multiprocessing, the processors share the same input/output (I/O) bus or data path. A single copy of the OS is in charge of all the processors.

与大规模并行处理(MPP)系统相比,SMP 系统更适合在线事务处理,因为在大规模并行处理系统中,许多用户通过一组相对简单的事务访问同一个数据库。与 MPP 系统不同,SMP 系统可以动态地平衡计算机之间的工作量,从而更快地为更多用户提供服务。

SMP systems are better suited for online transaction processing than massively parallel processing (MPP) systems in which many users access the same database in a relatively simple set of transactions. Unlike MPP systems, SMP systems can dynamically balance the workload among computers to serve more users faster.

SMP 计算机体系结构是一种多处理器硬件和软件体系结构,拥有多个相同的处理器。这些处理器平等共享主内存,并可访问所有 I/O 设备。如今,大多数现代操作系统都支持 SMP 机器。在过去,用户必须学习特殊的编程技巧才能使用 SMP。

The SMP computer architecture is a multiprocessor hardware and software architecture that has multiple identical processors. The processors equally share main memory and have access to all I/O devices. Today, most modern OSes support SMP machines. In the past, users had to learn special programming skills to use SMP.

How is SMP used?

对称多处理系统主要用于资源密集型计算环境。这些环境需要大量的计算能力来执行应用任务和进程。大多数多处理器系统使用 SMP 架构。

Symmetric multiprocessing systems are used primarily in resource-intensive computing environments. These are environments that need a large amount of computing power to execute application tasks and processes. Most multiprocessor systems use SMP architectures.

SMP 最适用于分时系统和多线程分时系统。时间共享是指将计算资源同时分配给多个用户。同样,多线程是中央处理器(CPU)的一项功能,可在一个进程中执行多个并发任务。更具体地说,多线程可使多个指令线程独立执行,共享相同的处理资源。

SMP is most useful for time-sharing systems and multithreading time-sharing systems. Time sharing is the distribution of a computing resource to multiple users at one time. Similarly, multithreading is a central processing unit (CPU) feature that enables multiple, concurrent tasks to be performed in one process. More specifically, multithreading enables multiple instruction threads to execute independently, all sharing the same processing resources.

时间共享使用 SMP,因为它将计算资源分配给多个用户,并可并行运行多个进程。SMP 的设计目的是让多个进程在不同的处理单元上运行,它为这一处理提供了帮助。在多线程中使用 SMP 也是出于同样的原因,因为多线程可以同时处理多个操作,而 SMP 则将线程分配给每个处理器。

Time sharing uses SMP, as it distributes computing resources to multiple users and can run multiple processes in parallel. This process is aided by SMP, which is designed to have more than one process running on different processing units. SMP is used in multithreading for the same reason, as multithreading handles multiple processes at one time and SMP divides the threads up to each processor.

然而,SMP 并不常用于个人电脑或应用程序,因为这些电脑或应用程序未经修改,无法考虑多线程编程。应用程序和程序的设计必须支持多线程,这样才能在不同的并行处理器上安排线程。

SMP, however, is not commonly used in PCs or applications that have not been modified to take multithreaded programming into account. Applications and programs need to be designed to enable multithreading so that threads can be scheduled on different parallel processors.

Memory space, I/O bus and data path are shared among multiple processors in SMP.

What are the advantages and disadvantages of SMP?

对称多处理的优势如下:

* 提高吞吐量。使用多个处理器运行任务可缩短任务执行时间。

* 可靠性。如果一个处理器出现故障,整个系统不会失效。但效率仍可能受到影响。

* 成本效益高。由于 SMP 系统中的处理器共享数据存储、电源和其他资源,因此从长远来看,SMP 是一种比单处理器系统更经济的提高系统吞吐量的方法。

* 性能。由于吞吐量增加,SMP 计算机系统的性能明显高于只有一个处理器的系统。

* 编程和执行代码。程序可在 SMP 系统的任何处理器上运行,并达到大致相同的性能水平,这使得编程和执行代码变得相对简单。

* 多个处理器。如果某项任务需要很长时间才能完成,可以增加多个处理器来加快进程。

Advantages of symmetric multiprocessing include the following:

* Increased throughput. Using multiple processors to run tasks decreases the time it takes for the tasks to execute.

* Reliability. If a processor fails, the whole system does not fail. But efficiency may still be affected.

* Cost-effective. SMP is a less expensive way long term to increase system throughput than a single processor system, as the processors in an SMP system share data storage, power supplies and other resources.

* Performance. Because of the increased throughput, the performance of an SMP computer system is significantly higher than a system with only one processor.

* Programming and executing code. A program can run on any processor in the SMP system and reach about the same level of performance, which makes programming and executing code relatively straightforward.

* Multiple processors. If a task is taking too long to complete, multiple processors can be added to speed up the process.

不过,SMP 也有以下缺点:

* 内存花费。由于 SMP 中的所有处理器都共用内存,因此主内存必须足够大,以支持所有处理器。

* 兼容性。要使 SMP 正常工作,操作系统、程序和应用程序都必须支持该架构。

* 复杂的操作系统。操作系统管理 SMP 系统中的所有处理器。这意味着操作系统的设计和管理可能非常复杂,因为操作系统需要处理所有可用的处理器,同时还要在资源密集型计算环境中运行。

However, SMP also comes with the following disadvantages:

* Memory expense. Because all processors in SMP share common memory, main memory must be large enough to support all the included processors.

* Compatibility. For SMP to work, the OS, programs and applications all need to support the architecture.

* Complicated OS. The OS manages all the processors in an SMP system. This means the design and management of the OS can be complex, as the OS needs to handle all the available processors, while operating in resource-intensive computing environments.

参考:

What is Symmetric Multiprocessing (SMP)?

  • 5
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

夜流冰

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值