Re: about linux kernel thread

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





2005/12/9, MHD.Tayseer <gilmour@xxxxxxxxxxx>:
Hsieh Steve wrote:

> Hi , everybody
>       I've got some problem about kernel thread and hope some one give
> me some hint.
>       1) is kernel thread a real-time process?

No .. acctualy , being a real-time or non-real-time task is a diferent
issue from being a process/thread ... this means you can use the call
"sched_setscheduler(2)" to change the scheduling algorithms to meet
real-time constrains, and changing the scheduling algorithm can be
applied to both proceses and kernel threads ..
AFAIK, the difference between process and thread in linux is subtle ..
they are almost the same but what make them different is that the
process has a separate memory allocated for it while the thread is a
process that it's memory is a pointer to it's parent process
 
first at all
appreciate for your reply!!
I agree your point, being realtime process is a different issue from being a thread
I think I dont repress my question clearly...
 
 
I think my question should be:
In linux, a thread seems to be implemented as a light-weight process, right?
if so, a kernel thread is a process from the view point of a scheduler.
then, Is there any popular kernel thread(such as ksoftirqd,keventd) belonging to a real-time process?? 
and
how is the kernel thread scheduled?use the same schedule primitive such as nice and count and the same time sharing algorithm ?? or there's another scheduler dedicated to schedule kernel thread??  

 


 
>       2) is there any difference between the scheduling of kernel
> thread and that of user process??
>

kernel is unaware of the user-level threads .. this means that it's not
responsible of scheduling them, scheduling user-level threads is done by
the thread library, while scheduling kernel-level threads is a kernel
responsibility
this makes the 3 kernel-level threads able of doing 3 blocking calls
while user-level threads are not .. cause calling a blocking operation
from a user-level thread will end to blocking the whole process owning them

hope it helps

MHD.Tayseer



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux