Multi-process and multi-threaded understanding

 

Process operating system is the basic unit of resource allocation, the thread is the basic unit cpu scheduling
process is an instance of the program is running, you can have multiple threads, separate memory space occupied, multiple threads share the process resources
a program has at least one process, a process at least one thread,
the process has a separate memory unit in the implementation process, and multiple threads of shared memory, thereby greatly enhancing the efficiency of the program
line thread can not perform independent, it must exist in the process according to
the advantages and disadvantages: threads and processes advantages and disadvantages in the use: small thread execution overhead, but not conducive to the management and protection of resources; and the process contrary.

Guess you like

Origin www.cnblogs.com/sea-stream/p/11247538.html