i am just started coding of device driver and new to threading, went through many documents for getting an idea about threads. i still have some doubts.
task_struct with no userspace components.kthreadd kernel thread instead of the init process) and is created by a kernel-only API instead of sequences of clone of fork/exec system calls.kthreadd as a parent. Apart from that, kernel thread enjoy the same "independence" one from another as userspace processes.kthread_run function/macro from the kthread.h header You will most probably have to write a kernel module in order to call this function, so you should take a look a the Linux Device Driversprintk calls), you can see this output in the kernel log using the dmesg command.