What is the difference between Process and Threads?

Answer Posted / shani kr. gupta

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
WEIGHT PROCESS.

Is This Answer Correct ?    84 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How would you detect a keypress in a jcombobox?

684


What’s jboss cache in short?

613


Do I need to import javlang package any time? Why ?

633


What are callback interfaces?

597


What value does read() return when it has reached the end of a file?

560






Why does the tag url-encode javascript and mailto links?

593


int x=5,i=1,y=0; while(i<=5) { y=x++ + ++x; i=i+2; } System.out.println(x); System.out.println(y); System.out.println(i); How to solve this? Please explain!

1374


What is the highest-level event class of the event-delegation model?

582


What classes of exceptions may be caught by a catch clause?

563


What value does readline() return when it has reached the end of a file?

604


Is the infobus client side only?

623


Which container method is used to cause a container to be laid out and redisplayed?

673


Explain what is orm?

685


Is the session factory thread safe?

689


What is the difference between long.class and long.type?

578