What is the Difference between a process and a thread?
Krishna Rajput Singh
A process is an executing instance of an application. What does that mean? Well, for example, when you double-click the Microsoft Word icon, you start a process that runs Word. A thread is a path of execution within a process. Also, a process can contain multiple threads. When you start Word, the operating system creates a process and begins executing the primary thread of that process.It’s important to note that a thread can do anything a process can do. But since a process can consist of multiple threads, a thread could be considered a ‘lightweight’ process. Thus, the essential difference between a thread and a process is the work that each one is used to accomplish. Threads are used for small tasks, whereas processes are used for more ‘heavyweight’ tasks – basically the execution of applications.Another difference between a thread and a process is that threads within the same process share the same address space, whereas different processes do not. This allows threads to read from and write to the same data structures and variables, and also facilitates communication between threads. Communication between processes – also known as IPC, or inter-process communication – is quite difficult and resource-intensive.
1)Process is synchronous where as thread will be both synchronous and asynchronous . 2) Every process contain thread . 3) Process is heavyweight thread is light wait. 4) Process share environment using thread.
Threads are used for small tasks, whereas processes are used for more long running tasks. Another difference between a thread and a process is that threads within the same process share the same address space, whereas different processes do .
Thread is a part of process. process is a kind execution of something in an application
Process can contain threads. A group of process can create a thread.
1. Threads are light weight compare to process. A process can contain a number of thread but a thread only belong to a single processprocess can execute a thread but thread can not call a process
process executes once at a time threadss can execute more than once at a time.
Process will execute concurrently. Threads will execute Parallel. Process can execute threads. But Thread's can't execute process. Process will work for long time operations, Threads will n't work. Process can start automatically. we can't start thread automatically. More over collection of Thread execution is a process
http://www.quora.com/What-is-the-difference-between-a-process-and-a-thread
A process is the running image of a program loaded and executed in the system's memory; a thread is is the smallest unit of processing that can be scheduled by an operating system. Every process has at last one thread (the main thread) that exists so to allow the process to run and perform its tasks.
Both processes and threads are independent sequences of execution. The typical difference is that threads (of the same process) run in a shared memory space, while processes run in separate memory spaces.
A process has its own address space. however, a thread shares the address space of the process with other threads running within that process...