What is the difference between processes and threads?


A process is an execution of a program, while a Thread is a single execution sequence within a process. A process can contain multiple threads. A Thread is sometimes called a lightweight process.

Processes Threads
Process is related to execution of a program . Process consists of multiple threds.
Processes communicate with each other using inter-process communication . Threads of a process can communicate with each other.
Processes have control over the child processes. Threads of a process can have control over other threads.
Any modification in the parent process does not alter child processes Any modification in the main thread may impact the behavior of the other threads of the process.
Processes get executed in separate memory spaces. Threads are executed in shared memory spaces.
Operating sytem controls the rocess . Developer of the software has control over the usage of the threads.
Processes are independent of each other. Threads are dependent on each other.
0 answers