Differentiation between Process and Thread

Q1. Differentiate between Process and Thread.

Ans.

Process Thread
1. Process is a program in execution. 1. Thread is a separate part of execution in program or it can be light weight process.
2. Process can contain number of threads at a time. 2. These are part of process.
3. It is a collection of virtual memory, space, code, data and system resources. 3. A thread is code that is to be serially executed within a process. It contains thread ID, a program counter, a register set and a stack.
4. Process share physical memory, disk, printers and other resources. 4. It share with other threads belonging to the same process, its code section, its data section and other sources as open files and signals.

Leave a Reply

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