Hyper-threading, Multi-threading, Multi-processing and Multi-tasking - Theory

喜你入骨 提交于 2020-01-30 08:05:28

问题


I am confused on the different terms as to their actual differences. What are each of them and what do they actually mean? My IT teacher at school gives us one definition the one day, and another the next, so please can you shed some light for me.

Thanks.


回答1:


A thread is a sequence of program instructions that are executed by the machine.

We call a program multi-threaded when a single execution of the program has more than one thread.

Multi-threading can be simulated on a single-processor machine: The processor switches its attention between the various threads at times that are determined by the system's scheduling policy and, by the program itself. I say "simulated", but as far as the programmer is concerned, there is little difference between the behavior of a properly synchronized, multi-threaded program running on a single-processor system and the same program running on a multi-processor system.

A multi-processor system has more than one CPU (CPUs are also known as "cores"). At any given moment, each CPU potentially could be executing a different thread of the same program. Or, different CPUs could be executing different programs.

Hyperthreading blurs the distinction between a single-processor system and a multi-processor system. Hyper-threaded processors are like conjoined twins: They have some of the attributes of separate processors (e.g., each has its own complete register set), but they share some functional units. Hyperthreading is a hardware-design issue that is invisible at the application level. Think of it as a trick that makes more efficient use of the available silicon.



来源:https://stackoverflow.com/questions/23252636/hyper-threading-multi-threading-multi-processing-and-multi-tasking-theory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!