Hello and welcome!
This is a small video session to see the difference between the threads in the process.
So in this figure we can see we have process one, process two, process three and process four.
So here the process one, two and three has their own virtual memory.
This means every process has its own private memory, and the process cannot access the virtual memory
of the other process.
In a sense, each process has a memory protection, whereas in the process four we can see that a process
four has created three threads, and threads are part of the process.
The thread is also called as lightweight process, whereas the process is usually a heavyweight process.
The threads share the virtual memory of the process in which it is created.
Hence the data communication between the threads are very simple when compared to the process.
So since the process has its own private memory, if a process one has to send or receive data to process
two, it has to be done using the IPC.
That is nothing but the inter-process communication.
Whereas if thread one wants to send some data to thread two, then it can put the data on the global
variables or the variables that are present in the data segment or the heap segment.
Hence, the communication between the threads are very much simple when compared to the process.