[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: kernel_thread
On Thu, 7 Nov 2002, Ashoke Saha wrote:
> I am not an OS guy and trying to learn some OS stuff.
> When we call kernel_thread(), with a function pointer, when is that function
> called ?
> Does it preemt the thread calling the kernel_thread() -OR-
No it doesn't.
> the kernel just puts the new thread in run queue and runs it later based in
> scheduling algorithm ?
This is right.
In fact, kernel_thread() works in very similar way to fork() (respecitvely
clone()) - allocated new task struct, fills in aproropriate values, and
puts it on the runqueue.
--
JiKos.
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/