Re: about linux kernel thread

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

 



On Fri, Dec 09, 2005 at 14:37:49 +0200, MHD.Tayseer wrote:
> 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 

It depends on what you call a "user-level" thread. Threads created with
pthreads *ARE* scheduled by kernel. All schedulable entities are the
same as far as scheduler is concerned (ok, they can use different
scheduling algorithm (real-time/normal)).

> responsible of scheduling them, scheduling user-level threads is done by 
> the thread library, while scheduling kernel-level threads is a kernel 
> responsibility

kernel-level threads and kernel threads are two vastly different things.
kernel-level thread (usually) means: A thread of a user space
	application, that is a schedulable entity.
kernel thread means: A schedulable entity that runs kernel space code
	and has no associated user space.

> 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

Right, but I believe the question was about the kernel threads, NOT
kernel-level (user space) threads.

-- 
						 Jan 'Bulb' Hudec <bulb@xxxxxx>

Attachment: signature.asc
Description: Digital signature


[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