Process thread relationship

(1) A thread can only belong to one process, and a process can have multiple threads, but at least one thread

(2) Resources are allocated to the process, the process is the main body of the program, and all threads of the same process share all the resources of the process

(3) The cpu is assigned to the thread, that is, the thread is really running on the cpu

(4) A thread is the smallest unit of execution, and a process is the smallest unit of resource management

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325645039&siteId=291194637