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

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.

主站蜘蛛池模板: 双牌县| 富源县| 黑龙江省| 新乡县| 东阿县| 屏东市| 建始县| 巴林左旗| 鲁甸县| 乌拉特后旗| 新龙县| 华宁县| 大连市| 扶绥县| 荆州市| 霸州市| 东莞市| 盈江县| 区。| 五家渠市| 茌平县| 福贡县| 托克逊县| 前郭尔| 新竹市| 武山县| 西丰县| 昌邑市| 郸城县| 铜陵市| 永和县| 盐源县| 大渡口区| 六枝特区| 从江县| 淮北市| 思南县| 鹤岗市| 金沙县| 吴忠市| 定州市|