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

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.

主站蜘蛛池模板: 马龙县| 宣汉县| 宜城市| 平舆县| 桐梓县| 轮台县| 萍乡市| 富川| 昭苏县| 阿拉尔市| 旬邑县| 罗平县| 邵武市| 武鸣县| 孝感市| 本溪市| 鄂伦春自治旗| 广元市| 会东县| 巫山县| 和顺县| 皮山县| 霍州市| 石景山区| 洪江市| 邵武市| 西城区| 随州市| 海晏县| 和平县| 若尔盖县| 江城| 信丰县| 凤凰县| 旬阳县| 延寿县| 德钦县| 类乌齐县| 锡林浩特市| 西充县| 清徐县|