What is the difference between Process and Threads?

Answers were Sorted based on User's Feedback



What is the difference between Process and Threads?..

Answer / rekha

A Procees is an execution of program but a thread is a
single execution sequence within a process(and so called
a "light weight process").

A process can contain n number of threads.

Is This Answer Correct ?    168 Yes 11 No

What is the difference between Process and Threads?..

Answer / sathya

Process are heavy weight programs which consume considerable
amnt of memory for execution and are heavily dependent on
system resources for their execution

Threads are light weight and use the min available sys
resources as a whole and can execute simultaneously to
acheive a given task.

Is This Answer Correct ?    130 Yes 23 No

What is the difference between Process and Threads?..

Answer / 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

What is the difference between Process and Threads?..

Answer / biswajit padhan

The major difference between threads and processes is

1.Threads(Light weight Processes) share the address space
of the process that created it; processes have their own
address
.2.Threads have direct access to the data segment of its
process; processes have their own copy of the data segment
of the parent process.
3.Threads can directly communicate with other threads of
its process; processes must use interprocess communication
to communicate with sibling processes.
4.Threads have almost no overhead; processes have
considerable overhead.
5.New threads are easily created; new processes require
duplication of the parent process.
6.Threads can exercise considerable control over threads of
the same process; processes can only exercise control over
child processes.
7.Changes to the main thread (cancellation, priority
change, etc.) may affect the behavior of the other threads
of the process; changes to the parent process does not
affect child processes.If we consider running a word
processing program to be a process, then the auto-save and
spell check features that occur in the background are
different threads of that process which are all operating
on the same data set (your document).

Is This Answer Correct ?    62 Yes 7 No

What is the difference between Process and Threads?..

Answer / dinesh tiwari

A process is an instance of an running application.
And a Thread is the execution stream of the process.

A process can have multiple threads.

Is This Answer Correct ?    30 Yes 6 No

What is the difference between Process and Threads?..

Answer / shilpi

In Process switching time consume
but thread does not consume switching time.

Is This Answer Correct ?    20 Yes 11 No

What is the difference between Process and Threads?..

Answer / srinivas

Thread is nothing but functionality(group of statements)
which could be executed simultaneously with the other part
of the program, with the concept of each other.

Where as a process is nothing but 'a program which is under
execution'. Thread is a part of the process

Is This Answer Correct ?    6 Yes 0 No

What is the difference between Process and Threads?..

Answer / kamran

The key difference is that processes are fully isolated
from each other; threads share (heap) memory with other
threads running in the same application.

Is This Answer Correct ?    17 Yes 12 No

What is the difference between Process and Threads?..

Answer / alok mmmec gkp

THE BASIC DIFFERENCE B/W THREADS AND PROCESSS IS THAT
THREAD CONTAINS A STACK IN WHICH USER N KERNAL PROCESS ADDRESS
ARE STORED
FOR EVERY STEP A NEW PROCESS IS CREATED IN THE PLACE OF IT
THREADS USES ITS STACK

Is This Answer Correct ?    28 Yes 24 No

What is the difference between Process and Threads?..

Answer / yash modi

In threading environment,one portion of program can run
independently of other portions.

Is This Answer Correct ?    4 Yes 1 No

Post New Answer

More Advanced Java Interview Questions

Difference between swing and awt?

0 Answers  


How to do registration form using struts and hibernate?

1 Answers  


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

0 Answers  


why we use main in java?

4 Answers  


What is a class loader?

0 Answers  






Write a program on RMI and JDBC using StoredProcedure?

1 Answers  


Which characters may be used as the second character of an identifier, but not as the first character of an identifier?

0 Answers  


Why use a datasource when you can directly specify a connection details? (in a J2EE application)

1 Answers  


whats is mean by class.forName() whats the return type of class

3 Answers   SolutionNET,


What is the diffrence between a local-tx-datasource and a xa-datasource? Can you use transactions in both?

0 Answers  


How to synchronize jsp page?

1 Answers   Infotech, TCS,


Explain the life cycle of servlet?

3 Answers   Cognizant, HCL,


Categories