I am having a doubt on the premptiveness of the Linux kernel. I know that user space processes and threads are premptible, but what about kernel level threads, those created using kthread_create
.
If a thread is created using kthread_create
, can it be preempted by scheduler and another kernel thread be executed?
If suppose the kernel thread just performs while(1) {}
, will it always run to completion occupying a particular CPU, or the scheduler can schedule out the thread ? Can it cause softlockup message?
I am trying to understand RCU, but I realised, I need to understand, preemptive non-preemptive kernels first.