143k views
4 votes
There are two main advantages to using multiple threads in a process: 1) Less work involved in creating a new thread rather than a new process 2) Communication among threads within the same process is simplified. Briefly explain how threads give these advantages. Is it also true to say that context switching between two threads in the same process involves less work than switching to a thread in a different process?

User Dtsg
by
4.9k points

1 Answer

1 vote

Answer:

Thread is a light weight where as Process is a heavy weight in nature

Step-by-step explanation:

A process can use to accomplish complex tasks which involves utilization of more system resources. Thread is part of process which is used to accomplish some smaller task. Thread is light weight and involves utilization of less no of resources.

A process can have more than one thread for execution. we can execute these threads in a process parallelly. This is known as Multi Threading.

There are Mainly 2 Advantages to using multi threads in a process

Less work Involved in creating New Thread rather than a New process: this is because all threads in a process use same address space so it is very easy to communicate and operate these threads in a process. Each process is used separate address space so if we want to create another process then it involves utilization of more resource so more overhead

Communication among threads in same process also simplified as these are using same address space

User Omari Celestine
by
5.2k points