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

Process-When a program executed then process creats which
take space in the memory with its own address space.
-context switching will be delay and more costly in compare
to the thread as it will be the swiching from one memory
space to other memory space.
-One Process can have multiple thread..
Ex-Window Media Player
In the media player

Is This Answer Correct ?    4 Yes 1 No

What is the difference between Process and Threads?..

Answer / sanjit patra

Process is part of program.


But,thread is part of process

Is This Answer Correct ?    1 Yes 0 No

What is the difference between Process and Threads?..

Answer / surabhee

Firstly,a process can contain multiple threads.
In multithreading operating systems, a process gets its own memory address space; a thread doesn't.
Threads typically share the heap belonging to their parent process.
Even though they share a common heap, threads have their own stack space.

Is This Answer Correct ?    1 Yes 0 No

What is the difference between Process and Threads?..

Answer / hetal

A process is a running instance of a program to which system allocates resources like CPU time and memory (separate heap, method area etc. which does not overlap with other process running on the system at the same time). In a big application there may be a set of cooperating processes communicating to each other in order to perform the desired functionality. Two processes communicate through well defined inter process communication mechanism, such as pipes, sockets and shared memory, if both processes are running on the same machine.

On the other hand threads exist within a process; every process has at least one thread. A thread is a light weight process that does not require as much resources as a process requires. Threads running inside a process, share the common set of resources among themselves which are allocated to the process (including the memory, the address space). All the threads share the same heap and method area (but individual stacks). All local variables are thread safe in Java because local variables are stored in each thread's own stack and each thread has its own stack created. Because threads share virtual address space, that makes inter thread communication between threads much cheaper than inter process communication between two independent processes

Is This Answer Correct ?    1 Yes 0 No

What is the difference between Process and Threads?..

Answer / jagadeeesh

Process
Each process provides the resources needed to execute a program. A process has a virtual address space, executable code, open handles to system objects, a security context, a unique process identifier, environment variables, a priority class, minimum and maximum working set sizes, and at least one thread of execution. Each process is started with a single thread, often called the primary thread, but can create additional threads from any of its threads.
threads
thread is the entity within a process that can be scheduled for execution. All threads of a process share its virtual address space and system resources. In addition, each thread maintains exception handlers, a scheduling priority, thread local storage, a unique thread identifier, and a set of structures the system will use to save the thread context until it is scheduled.It is termed as a ‘lightweight process’, since it is similar to a real process but executes within the context of a process and shares the same resources allotted to the process by the kernel

Is This Answer Correct ?    0 Yes 0 No

What is the difference between Process and Threads?..

Answer / vinod kumar thapa

process takes more memory space in compare to thread

Is This Answer Correct ?    0 Yes 1 No

What is the difference between Process and Threads?..

Answer / praju

tread have not its own memory address.
process have its own address

Is This Answer Correct ?    3 Yes 6 No

What is the difference between Process and Threads?..

Answer / reet

threads can share address or directly acess the address
process dont directly access the addresss

Is This Answer Correct ?    22 Yes 26 No

What is the difference between Process and Threads?..

Answer / sharry

thrads r nt independent
processes r independent there is no sharing

Is This Answer Correct ?    12 Yes 44 No

Post New Answer

More Advanced Java Interview Questions

whats is mean by connectionpooling

2 Answers   SolutionNET,


what is singleton class? where it mainly used in the projects?

5 Answers   Satyam, Wipro,


What is the name of the state, when a thread is executing?

4 Answers  


What is message driven beam?

0 Answers  


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

3 Answers   SolutionNET,






how the mapping can be done from jsp to actionservlet?

2 Answers   SolutionNET,


difference of inheritance and interface

3 Answers  


how to make a index.jsp for running the site in internet and find an error for connection with weblogic server and java that give an error invalid object name.and how to maintain session.

0 Answers  


What is JasperReports?

2 Answers  


what is default length of textfield ?

1 Answers  


What is the relationship between local interfaces and container-managed relationships?

0 Answers  


Define prototype?

0 Answers  


Categories