Process

Thread

A program in execution.Part of a process.
Heavy weight and take more resources.Light weight and take less resources.
Take more time for creation.Take less time for creation.
Every process has its own memory space.It use memory of the process they belong to.
Communication is slow and complex.Easy and efficient communication.
Memory is not shared.Memory is shared
If one process crashes it doen’t affect other.If one thread crashes it affect other.
Expensive context switching.Inexpensive context switching.
If process is dies,its all resources are reclaimed and all threads dies.If thread is dies,its stack is reclaimed.
In multiple processes each process operates independently.One thread change,read and write another threads data.
It has code/heap/data and other segments.It has no data segments and heap.

By Arun

Leave a Reply

Your email address will not be published. Required fields are marked *