Explain the differences between a Thread and a Process?

Asked 06-Apr-2022
Viewed 317 times

1 Answer


0

  •  A process is a running programme, or an active programme. A thread is a small, self-contained process that can be handled by a scheduler.
  • Time to switch contexts-Because processes are more complex, context switching takes longer. Because threads are lighter than processes, context switching takes less time.
  • Sharing Memories-Processes are completely self-contained and do not exchange memory. A thread's peers may share some memory with it.
  • Communication-It takes longer to communicate between processes than it does between threads. Thread communication takes less time than communication between processes.
  • Blocked-If a process is blocked, the rest of the processes can continue to run. When a user level thread is blocked, it causes all of its peer threads to be blocked as well.
  • Consumption of Resources-Threads use fewer resources than processes. 


Read More: What is the difference between an EXE and a DLL?