Defined:
Process: is a program running instance, is a system for resource allocation and scheduling of a separate unit, it includes a separate address space, resources and 1 or more threads.
Threads: can be seen as lightweight processes, the basic unit of CPU dispatch and dispatch
Difference:
1, dispatch: From the above definition can be seen as a basic unit of dispatch and dispatch, one is the basic unit of resources
2, shared address space, resources: The process has its own separate address space, resources, so the sharing complex, need IPC, synchronization is simple; thread sharing the resources of the process, sharing simple, but synchronization complex, to pass locking and other measures.
3, memory, CPU: Process consumes more memory, switch complex, CPU utilization is low, thread consumes less memory, easy to switch, high CPU utilization
4, Interaction: The process does not interact with each other; a thread hanging off causes the entire process to hang.
threads, Process differences Introduction