In computing, a process is the instance of a computer program that is being executed. It contains the program code and its activity. Depending on the operating system (OS), a process may be made up of multiple threads of execution that execute instructions concurrently瀏覽器
由於安全性和可靠性,現代操做系統不容許進程之間直接通信,採用了一種嚴格的通信方法叫作 IPC (Inter-process communication)。安全
多任務的操做系統存在多個進程同時執行,單核CPU一次性只能執行一個進程,CPU進行切換任務,沒必要等待上一個任務執行結束。多線程
一般,程序中的主程序只有單個進程和多個子進程。架構
In computer science, a thread of execution is the smallest sequence of programmed instructions that can be managed independently by a scheduler, which is typically a part of the operating system.[1] The implementation of threads and processes differs between operating systems, but in most cases a thread is a component of a process. Multiple threads can exist within one process, executing concurrently and sharing resources such as memory, while different processes do not share these resources. In particular, the threads of a process share its executable code and the values of its dynamically allocated variables and non-thread-local global variablesat any given time.併發
瀏覽器架構-原理篇post