The final summary is:
(1) noun explanation: a process is an execution activity of a program on a computer. Threads (Thread) is an entity of a process .
A program has at least one process , and a process has at least one thread .
(2) Address space: The process has an independent resource, and the thread shares the resources. There is a separate address space between different processes, and the address space of the process is shared between different threads of a process. The most essential difference
Note: From a logical point of view, the meaning of multithreading is that in an application, multiple execution parts can be executed concurrently. However, the operating system does not consider multiple threads as separate applications to implement scheduling and management of processes and resource allocation. This is the important difference between processes and threads. "
Note: The process overhead is large and the thread overhead is small. Indeed, this is the most basic difference. 】
(3) Resource allocation
A process is the unit in which the operating system allocates resources, and threads are the basic unit of CPU Dispatch and Dispatch
Threads (Thread) is an entity of the process and is CPU basic unit of dispatch and Dispatch
(4) Individual benefits
Process: Multiple programs can be loaded into memory at the same time, under the scheduling of the operating system, executing concurrently, greatly improving the utilization of the CPU, the process is to achieve multi-channel programming on the CPU proposed.
Threads: On the one hand, the concurrency of the process can be increased, and the thread has the advantage of being able to effectively utilize multiprocessor and multicore computers.
Classic Reference article: http://www.cnblogs.com/hazir/archive/2011/05/09/2447287.html
Http://blog.chinaunix.net/uid-21411227-id-1826748.html
The difference between threads and processes