so what are the differences between a kernel module and kernel threads, as you said kernel threads can be scheduled, pre-empted and all.that is one Whats the utility of kernel threads, do drivers generally use them or if I put it in a better way, when should someone think of using kernel threads in his/her modules? thanks Amit Anupam Kapoor <anupam.kapoor@gmail.com> on 06/30/2004 02:55:43 PM To: Jan Hudec <bulb@ucw.cz> cc: Amit Kumar Singh/HSS@HSS, Anandraj <arm@tataelxsi.co.in>, kernelnewbies@nl.linux.org Subject: Re: kernel threads also, kernel threads have their mm pointer set to NULL. kernel threads are schedulable, preemptible etc. just like normal processes. anupam On Wed, 30 Jun 2004 10:55:40 +0200, Jan Hudec <bulb@ucw.cz> wrote: > On Wed, Jun 30, 2004 at 13:15:23 +0530, aksingh@hss.hns.com wrote: > > i read that already, there the programmer has used his own functions to > > create threads and all, i just wanted to know if kernel threads are > > standard features and if kernel provides some functions to create, destroy > > them, because I never came across them in linux till now. I dont think > > drivers create different threads, correct ? > > Kernel threads are created, surprisingly, with a function > kernel_thread(). Then they need to call daemonize() to fully get rid of > their userland and reparent to init, because they are created by cloning > whatever process happens to be current. > > ------------------------------------------------------------------------------- > Jan 'Bulb' Hudec <bulb@ucw.cz> > > > -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/