What resources are used when a thread created? How do they differ from those when a process is created?

When a thread is created the threads does not require any new resources to execute the thread shares the resources like memory of the process to which they belong to. The benefit of code sharing is that it allows an application to have several different threads of activity all within the same address space.Where as if a new process creation is very heavyweight because it always requires new address space to be created and even if they share the memory then the inter process communication is expensive when compared to the communication between the threads. 

Showing Answers 1 - 6 of 6 Answers

sagar.singh

  • Aug 23rd, 2007
 

Thread:
In case of thread only one copy of resources are made. means Resources are shared between different threads. This is done on a synchronised basis.

Process:
A
separate instances of resources are alloted to different processes at same time and they are not synchronised.

  Was this answer useful?  Yes

krisgroup

  • Oct 22nd, 2007
 

hi,

Adding to above one more important thing to keep in consideration,

even threads share the same address space of the process, each thread has its own stack so if u are running multithreading program you find each thread maintaining its own state, so the threads share the heap of the process maintaining their own stack.

hope it helps,

chaitanya gudipati

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions