官术网_书友最值得收藏!

Threads versus processes

More than one thread can be implemented within the same process, most often executing concurrently and accessing/sharing the same resources, such as memory; separate processes do not do this. Threads in the same process share the latter's instructions (its code) and context (the values that its variables reference at any given moment).

The key difference between the two concepts is that a thread is typically a component of a process. Therefore, one process can include multiple threads, which can be executing simultaneously. Threads also usually allow for shared resources, such as memory and data, while it is fairly rare for processes to do so. In short, a thread is an independent component of computation that is similar to a process, but the threads within a process can share the address space, and hence the data, of that process:

A process with two threads of execution running on one processor

Threads were reportedly first used for a variable number of tasks in OS/360 multiprogramming, which is a discontinued batch processing system that was developed by IBM in 1967. At the time, threads were called tasks by the developers, while the term thread became popular later on and has been attributed to Victor A. Vyssotsky, a mathematician and computer scientist who was the founding director of Digital's Cambridge Research Lab.

主站蜘蛛池模板: 宾阳县| 肇东市| 嘉兴市| 卢氏县| 富平县| 双牌县| 芜湖县| 荔浦县| 游戏| 潜山县| 盘山县| 阿鲁科尔沁旗| 贺兰县| 任丘市| 南皮县| 红桥区| 班玛县| 蓝田县| 乌兰浩特市| 东阳市| 安溪县| 霞浦县| 太仆寺旗| 玉树县| 特克斯县| 乌鲁木齐市| 石首市| 宁强县| 富锦市| 沈丘县| 汪清县| 来凤县| 应城市| 来凤县| 涿鹿县| 辉县市| 分宜县| 黄平县| 秦安县| 中卫市| 安福县|