What is the difference between Process and Threads?
Answers were Sorted based on User's Feedback
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 |
Answer / sanjit patra
Process is part of program.
But,thread is part of process
| Is This Answer Correct ? | 1 Yes | 0 No |
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 |
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 |
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 |
Answer / vinod kumar thapa
process takes more memory space in compare to thread
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / praju
tread have not its own memory address.
process have its own address
| Is This Answer Correct ? | 3 Yes | 6 No |
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 |
Answer / sharry
thrads r nt independent
processes r independent there is no sharing
| Is This Answer Correct ? | 12 Yes | 44 No |
diff between jsp include directive and jsp action include?
What are the steps to write p-to-p model application?
What is difference RMI registry and OSAgent?
What is the purpose of the wait(), notify(), and notifyall() methods?
what is meant by JRMP?
Connection Pooling with different type of databases?
What is the diffrence between a local-tx-datasource and a xa-datasource? Can you use transactions in both?
What is the RMI and Socket?
function of extends and implements keywords?
What is ioc concept & explain it?
How would you create a button with rounded edges?
What is UniCastRemoteObject and what is its use in RMI?