调度算法和调度策略
Scheduler algorithms and scheduler policy
在linux操作系统中,"scheduler algorithms"和"scheduler policy"有什么区别?
来自man 7 sched
:
The scheduler is the kernel component that decides which runnable
thread will be executed by the CPU next. Each thread has an
associated scheduling policy and a static scheduling priority,
sched_priority. The scheduler makes its decisions based on knowledge
of the scheduling policy and static priority of all threads on the
system.
因此,在 Linux 上调度的情况下,调度算法 调度进程。它只是解决特定问题的算法。每个线程都有一个调度策略,它决定了它是如何调度的。再次来自 man 7 sched
:
A thread's scheduling policy determines where it will be inserted into
the list of threads with equal static priority and how it will move
inside this list.
结论:调度算法根据一种或多种调度策略进行调度。
在linux操作系统中,"scheduler algorithms"和"scheduler policy"有什么区别?
来自man 7 sched
:
The scheduler is the kernel component that decides which runnable thread will be executed by the CPU next. Each thread has an associated scheduling policy and a static scheduling priority, sched_priority. The scheduler makes its decisions based on knowledge of the scheduling policy and static priority of all threads on the system.
因此,在 Linux 上调度的情况下,调度算法 调度进程。它只是解决特定问题的算法。每个线程都有一个调度策略,它决定了它是如何调度的。再次来自 man 7 sched
:
A thread's scheduling policy determines where it will be inserted into the list of threads with equal static priority and how it will move inside this list.
结论:调度算法根据一种或多种调度策略进行调度。