Thread introduced Linux-

1, using the process technology advantage

(. 1), CPU time division multiplexing, a single macroscopic core CPU can be implemented on parallel

(2), multi-tasking system requirements (multi-tasking system is objective)

2, inferior process technology

(1), inter-process large overhead switch

(2), inter-process communication cumbersome and inefficient

3, the solution is threading technology

(1), threading retains the characteristics of the process technology to achieve multi-tasking.

(2), is improved thread switching between threads between the thread and improve communication efficiency.

(3), multi-threaded multi-core CPU above advantage.

About 4 threads, in Linux

(1), a lightweight process

(2), the kernel thread is the smallest unit involved in the scheduling of

5, the advantages of threading technology

(1), as the process is the same as the OS scheduler

(2), between multiple threads of the same process can easily communicate efficiently

(3) in multi-core CPU (symmetric multi-processing architecture SMP) architecture to maximize efficiency (it can ensure multiple threads running on multiple cores)

Guess you like

Origin www.cnblogs.com/jiangtongxue/p/11293691.html