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