Re: about linux kernel thread

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

 



On Wed, Dec 14, 2005 at 08:32:37 +0300, MHD.Tayseer Alquoatli wrote:
> > It depends on what you call a "user-level" thread. Threads created with
> > pthreads *ARE* scheduled by kernel.
> 
> i understand from your sentence that pthreads are a user-level threads but
> the kernel is aware of them and do the scheduling for them. is this means
> that calling a blocking operation from one pthread will NOT block the whole
> process ? so what do i miss ? does pthreads create threads using clone
> syscalls ? or is there is a second definition of user-level threads  ?
> correct me please

User-level threads is usually used to mean "the user-space library
creates some kind of threads inside a single process". Ie. the threads
NOT created with clone(). In this sense, pthreads do NOT create
user-level threads. They create kernel-level threads. Which are not to
be confused with kernel threads.

Linux phtreads, both old-style and new-style (using ntpl available in
2.6 kernels) use clone to create the threads.

> 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.
> 
> 
> thank you for clarifying this point. i was unaware of the difference

Well, on a kernel-related list, you need to make a distinction between
threads running userspace code where kernel takes care of the threading
(kernel-level threads) and threads running kernel code (kernel 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