开发者

Thread Quantum?

What is a thread quantum, and how can 开发者_如何学编程I identify it on my system?


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


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.


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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜