Home > DeveloperSection > Interviews > What are the states associated in the thread?

Posted on    October-25-2010 12:00 AM

 Java Java 
 1 Answer(s)
  827  View(s)
Rate this:

Rajesh Goswami

Total Post:85

Posted on    November-09-2010 1:00 AM

Process is a program in execution.Suppose there r two processes that means that occurs at
different-different memory location. and the context switching b/w process is more expensive.bcz it will take
more time from one memory allocation to other memory allocation.that is why Process is called HEAVY WEIGHT PROCESS.

Thread is smallest part of program.and It is independent sequential path of execution with in a program.
Suppose there r two threads that means that occurs at same memory location bcz of smallest part of program.
and the context switching b/w threads is less expensive rather than process.that is why Thraed is called Light

Don't want to miss updates? Please click the below button!

Follow MindStick