Thread Quantum?

前端 未结 5 1095
不知归路
不知归路 2020-12-16 13:01

What is a thread quantum, and how can I identify it on my system?

5条回答
  •  感动是毒
    2020-12-16 13:25

    I don't know how to identify, but I know what a Thread Quantum is.

    Multithreading, or parallelism in general, is not "true" parallelism on a single-core computer (nor it is on a dual-core when there are more than 2 threads, nor it is on a quad-core when there are more than 4 threads, etc.).

    The Operating System keeps track of a list of threads. Each thread has a priority. The list will execute the topmost thread on the list. The thread will execute for as long as allowed by the Thread Quantum. When a thread is finished executing, it will move down to the bottom of the list.

    Thread Quantum will determine how long a thread may run on a sequential system. Higher priority threads have higher Quantums and thus run longer.

提交回复
热议问题