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

what are JSP tags? what is difference between include action and directory?

0 Answers   ADP,


Explain bind(), rebind(), unbind() and lookup() methods?

1 Answers  


In HashTable I am storing null value..then what is the error it will show

2 Answers   GM General Motors,


what is Activation Instantinator?

0 Answers  


Describe activation process?

0 Answers  






What is diffennce between AWT & SWING?

4 Answers  


For which statements does it make sense to use a label?

0 Answers  


difference between applicationserver and webserver

2 Answers   SolutionNET,


How to add new JTabbed pane?

1 Answers  


Why do threads block on i/o?

0 Answers  


Will the general public have access to the infobus apis?

0 Answers  


difference between  ejb,struts,hibernate,spring and jsp

0 Answers  


Categories