Skip to content

Multiprocessing

在当今CPU朝着parallel scaling方向的发展的情况下,我们需要思考CPU的结构,而Multiprocessing则是对这个话题的讨论。

Wikipedia Multiprocessing

NOTE: 可以使用multiple model来描述Multiprocessing ,参见工程parallel-computing的Model\Multiple-model章节,因此,在Multiprocessing,就会面临multiple model中描述的所有的问题。

Multiprocessing is the use of two or more central processing units (CPUs) within a single computer system.[1][2] The term also refers to the ability of a system to support more than one processor and/or the ability to allocate tasks between them.[3] There are many variations on this basic theme, and the definition of multiprocessing can vary with context, mostly as a function of how CPUs are defined (multiple cores on one die, multiple dies in one package, multiple packages in one system unit, etc.).

Key topics

NOTE: 这一段对Multiprocessing中关键topic的总结是非常好的。

Processor symmetry

NOTE: "symmetry"的意思是"对称"。

Systems that treat all CPUs equally are called symmetric multiprocessing (SMP) systems. In systems where all CPUs are not equal, system resources may be divided in a number of ways, including asymmetric multiprocessing (ASMP), non-uniform memory access (NUMA) multiprocessing, and clustered multiprocessing.

NOTE: SMP、NUMA是我们经常遇到的。

Instruction and data streams

NOTE: 暂时没有遇到相关的内容

Processor coupling

Tightly coupled multiprocessor system
Loosely coupled multiprocessor system

Main article: shared nothing architecture

Multiprocessor Communication Architecture

NOTE: multiple model中的典型问题

Message passing

Separate address space for each processor.

processors communicate via message passing.

processors provide local message queue memories.

focus attention on costly non-local operations.

Shared memory

Processors communicate with shared address space

Processors communicate by memory read/write

Easy on small-scale machines

Lower latency

SMP or NUMA architecture

Flynn's taxonomy

Single instruction stream Multiple instruction streams Single program Multiple programs
Single data stream SISD MISD
Multiple data streams SIMD MIMD SPMD MPMD

NOTE: data stream**和**instruction stream

素材

csdn 聊聊高并发(五)理解缓存一致性协议以及对并发编程的影响