Difference between processor and process in parallel computing?
Asked Answered
P

4

6

Every time I come across something like "process 0 does x task" , I am inclined to think they mean processor.

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 :)

Parke answered 10/8, 2016 at 12:27 Comment(0)
G
5

These other answers are all pretty spot on. Processors are physical, processes are software. So a quad core CPU will have 4 processors, but can run many more processes.

Your confusion around distributed terminology is fair though. In distributed computing, typically X number of processes will be executed equal to the number of hardware processors. In this scenario, each processes gets an ID in software often called a rank. Ranks are independent of processors, and different ranks will have different tasks. So when you report a status, information is relative to the process rank, and not the physical processor.

To rephrase, in distributed computing there will usually be one process running on each processor. The process will have a unique id that is more important in the software than the physical processor it is running on, so status information is given about the process. As the number of processes and processors are equal, this distinction can get a bit blurred.

Galacto answered 10/8, 2016 at 20:34 Comment(1)
This is exactly what I was looking for! Infact all the answers are pretty spot on, but the whole idea of how each process has a rank and how this is loosely tied to processors, makes much more sense now! Thank you! :)Parke
H
2

The distinction is hardware vs software.

The process is the logical instance of your program. The processor is the hardware entity that runs the process. Most of the time, you don't care about the actual processor, only the process that's executing.

For instance, the OS may decide to temporarily put your processes to sleep in order to give other applications runtime, and later it may awaken them on different processors. As long as your processes produce the expected results, this should not be of any interest to you: all you care about is the computation, not where it's happening.

Haubergeon answered 10/8, 2016 at 18:22 Comment(0)
O
0

For me, processor refers to machine, that is responsible for computing operations. Process is a single instance of some program. (I hope i understood what you meant).

Orography answered 10/8, 2016 at 12:34 Comment(0)
A
0

I would say that they use the terms indistinctly because most of the time the context allows it and the difference may be subtle to some extent. That is, since each process (when it is single threaded) executes on a processor, people typically does not want to make the distinction between the physical entity (processor) and the logical entity (process).

This assumption might be wrong when considering processors with multithreading capabilities (SMT, and Hyper-Threading for Intel processors) and/or executing multi-threaded applications because processes run on any available processor (or thread). In those situations, people should be stricter when making this affirmations. Still, since it is possible to bind one process (and even one thread) to a processor (or processor thread) using affinity commands, they can use indistinctly both terms under these circumstances.

Anabasis answered 10/8, 2016 at 14:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.