Process vs Thread

Filter Course


Process vs Thread

Published by: Zaya

Published date: 22 Jun 2021

Process vs Thread Photo

Process vs Thread 

Process

Process means any program is in execution. Process control block controls the operation of any process. Process control block contains the information about processes for example Process priority, process id, process state, CPU, register, etc. A process can create other processes which are known as Child Processes. The process takes more time to terminate and it is isolated means it does not share a memory with any other process.

Thread

Thread is the segment of a process means a process can have multiple threads and these multiple threads are contained within a process. A thread has 3 states: running, ready, and blocked.

The thread takes less time to terminate as compared to process and like process threads do not isolate.

process vs thread

Difference between Process and Thread:

Process Thread
1. Process means any program is in execution. 1. Thread means the segment of a process.
2. Process takes more time to terminate. 2. Thread takes less time to terminate.
3. It takes more time for creation. 3. It takes less time for creation.
4. It also takes more time for context switching. 4. It takes less time for context switching.
5. Process is less efficient in terms of communication. 5. Thread is more efficient in terms of communication.
6. Process consumes more resources. 6. Thread consumes fewer resources.
7. Process is isolated. 7. Threads share memory.
8. Process is called heavyweight process. 8. Thread is called a lightweight process.
9. Process switching uses an interface in the operating system. 9. Thread switching does not require to call an operating system and cause an interrupt to the kernel.
10.If one server process is blocked no other server process can execute until the first process unblocked. 10.Second thread in the same task could run, while one server thread is blocked.