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

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.

主站蜘蛛池模板: 兰西县| 搜索| 靖西县| 化德县| 黎平县| 万盛区| 辉县市| 微山县| 兴安盟| 邵阳市| 岢岚县| 峨边| 谢通门县| 饶平县| 饶河县| 新民市| 双柏县| 龙海市| 纳雍县| 叙永县| 济南市| 西昌市| 平山县| 北票市| 潼南县| 逊克县| 义乌市| 芷江| 鞍山市| 元江| 肥乡县| 遂平县| 邵东县| 涡阳县| 牡丹江市| 东阿县| 孟津县| 怀集县| 德昌县| 青阳县| 伊通|