Issue
What is the default scheduling policy of a Linux kernel thread? Are all the policies like SCHED_NORMAL
, SCHED_RR
, SCHED_FIFO
applicable for the kernel threads as well?
Solution
kthread sets default policy to SCHED_NORMAL. See https://elixir.bootlin.com/linux/v5.18/source/kernel/kthread.c#L357 All task structs have a policy field, including kthreads.
Answered By - stark Answer Checked By - Robin (WPSolving Admin)