问题
What is a thread quantum, and how can I identify it on my system?
回答1:
Thread Quantum is the amount of time that the schedule allows a thread to run before scheduling a different thread to run.
What are threads?
Platform Builder: Setting the Default Thread Quantum
As far as editing goes...There is a registry setting in windows that allows priority changing:
HKEY_LOCAL_MACHINE / SYSTEM / CurrentControlSet / Control / PriorityControl / Win32PrioritySeparation
0 Foreground and background applications equally responsive
1 Foreground application more reponsive than background
2 Best foreground application response time
回答2:
Check out this tutorial on thread quanta and scheduling
In particular:
Each thread has a quantum, which is effectively how long it is allowed to keep hold of the CPU if:
it remains runnable;
the scheduler determines that no other thread needs to run on that CPU instead.
回答3:
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.
回答4:
Give a look at Round Robin Scheduling
http://en.wikipedia.org/wiki/Round-robin_scheduling
I think this may be what you are asking about. quantum is the unit of time give to each process to execute.
回答5:
How do you measure length? velocity? mass? It is the same thing with threads and processes.
A quantum is a unit of time. Programmers don't talk about the time that each thread is supposed to work in seconds, milliseconds or microseconds but in abstract unit of time called quantum.
来源:https://stackoverflow.com/questions/2387980/thread-quantum