问题
I am working on Ubuntu project. Have not found clear difference between sched_batch and sched_other. Can anyone tell me the difference?
回答1:
Threads that are scheduled with sched_batch
are assumed to be non-interactive, but CPU bound and optimized for throughput. Thus, this policy is more cache-friendly. The default sched_batch
timeslice is 1.5 seconds. In addition, in case of SMP, sched_batch
will migrate to a core with high idleness (with respect to non-batch threads).
回答2:
The primary difference is that sched_batch is a variant of sched_idle. I.e. such processes only get to use the cpu if sched_other
processes don't want to.
来源:https://stackoverflow.com/questions/30284496/what-is-difference-between-sched-batch-and-sched-other-scheduling