Thread Quantum?

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

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

相关标签:
5条回答
  • 2020-12-16 13:23

    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 讨论(0)
  • 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.

    0 讨论(0)
  • 2020-12-16 13:26

    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.

    0 讨论(0)
  • 2020-12-16 13:32

    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.

    0 讨论(0)
  • 2020-12-16 13:47

    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

    0 讨论(0)
提交回复
热议问题