Re: about linux kernel thread

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

 



On Sat, Dec 10, 2005 at 02:41:07 +0530, pradeep singh wrote:
> On 12/9/05, Hsieh Steve <stevecfhsieh@xxxxxxxxx> wrote:
> >
> 
> > 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??
> AFAIR the there is a kernel level scheduler for handling kernel
> threads and a user level one for user threads, though indirectly
> sooner or later the user threads actually ask for kernel service
> through syscalls and then the kernel scheduler takes on from
> there.....

Nope. From kernel point of view, there are just "tasks", the schedulable
entities. They can be kernel threads, user processes or user threads,
it's all the same. Also in linux there is a smooth transition between
user process and user thread. In the clone call you can select what
shall remain shared.

> AFAIR i think solaris followed athis LWP approach where it maps user
> threads to these LWProcesses which are mapped in turn to the kernel
> threads and are handled by the kernel scheduler.

Linux has it even simpler. It has only ONE kind of schedulable entities.
In 2.6, thread groups were added that show up in ps as one process so
POSIX threads behave more like POSIX says. But that does not affect
scheduler at all.

-- 
						 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