On Thu, 18 Jan 2024 09:14:05 +0100, Marco Moock wrote:
> Some programs say that they are multi-process or multi-threaded.
>
> What is the exact difference here?
Think of a bare-minimum context of execution: a program counter that
points at an instruction stream, and some machine state for executing
those instructions.
Obviously that’s not enough to run any meaningful program: you also need
memory to hold that instruction stream and associated data, plus other OS
context like open files, network connections, access-control credentials
etc. Call that “process context”.
So if two execution contexts have their own process contexts, you call
them “separate processes”. If they share the same process context, you
call them “threads within a process”.
I think that’s about as basic a definition as you can get.