Sunday, 4 December 2016

What is the difference between Process and Thread ?


Difference between Process and Thread :-

Both processes and threads have independent path of execution. 

Processes are heavy-weight, while threads are light-weight process.

A process can have multiple threads, and thread is a smallest part of the process.

Processes share the different memory spaces, while all threads share the same memory space. In process all threads share system resources like heap memory. while threads has its own stack memory.

Any changes made to process does not affect child process, but any change made to thread can affect the behavior of the other thread .

Processes can easily communicate with child processes, but inter-process communication is difficult. While threads can easily communicate with each other using wait() and notify() methods.


      
Blog Author - Pushkar Khosla,
Software Developer by Profession with 3.0 Yrs of Experience , through this blog i'am sharing my industrial Java Knowledge to entire world. For any question or query any one can comment below or mail me at pushkar.itsitm52@gmail.com.

This blog is all about to learn Core Java ,Interview Programs and Coding tricks to polish your Java Knowledge. If you like the content of this blog please share this with your friends.



No comments:

Post a Comment