Re: about linux kernel thread

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

 



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

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


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[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