目录 进程和线程 Mutual exclusion (互斥锁) Semaphor (信号量) 为什么需要多线程呢? 进程线程的状态: 进程以及线程之间的交互: 并发 (Concurrency) 高并发 进程和线程 来源:良许Linux 进程 (Process) 与线程 (Thread) 都是计算机操作系统中的基本概念,在进程和线程之上有程序。 In Computing, a process is the instance of a computer program that is being executed by one or many threads. 程序是静态的,而进程是动态的,程序是作为进程运行的载体,进程会在某一时刻消亡。 程序可以包含多个进程,多个进程并发执行,相互独立,因此,进程也是系统进行资源分配和调度的基本单位