In: Computer Science
1. Difference between process and threads are listed below
Process | Threads |
---|---|
Execution of a program | Execution of a program driven by the environment of a process |
isolated from other processes | share memory and resources with eachother between threads |
Needs more resources | uses less resources |
Less efficient comparatively in communication | enhances efficiency in case of communication |
Creation time is more | creation time is less |
Termination time is more |
Less termination time |
2. Threads are independent like process such that it has own program counter, register set , stack space and also the allocated time. But threads are not completely independent since it shares the code section, data section and is resources with other threads
3. The advantages are,
The disadvantages are,