|
Answer» Thread: It simply refers to the smallest UNITS of the PARTICULAR process. It has the ability to execute different parts (referred to as thread) of the program at the same time.
Process: It simply refers to a program that is in execution i.e., an active program. A process can be handled using PCB (Process Control Block). | Thread | Process |
|---|
| It is a subset of a subunit of a process. | It is a program in execution containing multiple threads. | | In this, inter-thread communication is faster, LESS expensive, easy and efficient because threads share the same memory address of the process they belong to. | In this, inter-process communication is slower, expensive, and complex because each process has different memory space or address., | | These are easier to create, lightweight, and have less overhead. | These are difficult to create, heavyweight, and have more overhead. | | It requires less time for creation, termination, and context switching. | It requires more time for creation, termination, and context switching. | | Processes with multiple threads use fewer resources. | Processes without threads use more resources. | | Threads are parts of a process, so they are dependent on each other but each thread executes independently. | Processes are independent of each other. | | There is a need for synchronization in threads to avoid UNEXPECTED scenarios or problems. | There is no need for synchronization in each process. | | They share data and information with each other. | They do not share data with each other. |
|