并行计算中处理器和进程的区别?

ash*_*shv 5 distributed-computing mpi openmp shared-memory

每次我遇到诸如“进程 0 执行x任务”之类的内容时,我都倾向于认为它们是指处理器

After reading a bit more about it, I find that there are two memory classifications, shared memory and distributed memory: A shared memory executes something like a thread (implying same data is available to all processors- hence it makes sense to call it a process) However, even for distributed memory it is called a process instead of a processor. For example: "Process 0 is computing the partial dot product"

Why is this so? Why is it called a process and not a processor?

PS. I hope this question is not trivial :)

小智 5

这些其他答案都非常正确。处理器是物理的,进程是软件。因此,四核 CPU 将有 4 个处理器,但可以运行更多进程。

不过,您对分布式术语的困惑是公平的。在分布式计算中,通常将执行 X 个进程,其数量等于硬件处理器的数量。在这种情况下,每个进程在软件中都会获得一个 ID,通常称为等级。Rank 与处理器无关,不同的Rank 有不同的任务。因此,当您报告状态时,信息与进程级别相关,而不是与物理处理器相关。

换句话说,在分布式计算中,每个处理器上通常运行一个进程。该进程将有一个唯一的 ID,该 ID 在软件中比其运行的物理处理器更重要,因此会提供有关该进程的状态信息。由于进程和处理器的数量相同,这种区别可能会变得有点模糊。