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

What is the relationship between an event-listener interface and an event-adapter class?

553


What is a modular application? What does module-relative mean?

538


Explain about thread synchronization inside a monitor?

1993


What is the purpose of the wait() method?

619


Why are some of the class and element names counter-intuitive?

569






how do you Handle Front End Application data against DB with example?

1475


What are the different approaches to represent an inheritance hierarchy?

582


When a thread blocks on i/o, what state does it enter?

571


What is the difference between ear, jar and war file?

569


What modifiers may be used with an interface declaration?

556


What is JTS?

1862


what is Activation Instantinator?

1905


Why use a datasource when you can directly specify a connection details?

533


Explain RMI Architecture?

606


How substring() method of string class create memory leaks?

550