Re: Scheduler - kernel threads - threads - processes

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

 



On Fri, 23 Aug 2002 11:09:28 +0200
Wank Rainer <Rainer.Wank@icn.siemens.de> wrote:

WR> the Linux scheduler has three policies SCHED_FIFO, SCHED_RR and
WR> SCHED_OTHER. SCHED_FIFO and SCHED_RR are for realtime requirements.

	Don't forget SCHED_NORMAL.

	Regarding SCHED_FIFO and SCHED_RR yes, they actually have a higher
priority than other processes. The difference between the two policies is
the way they'll compete for the CPU with each other.

WR> There are also kernel threads, like [kswapd].  Does a kernel thread
WR> have a priority? How does the scheduler schedule kernel threads?

	Check preempt_count.

WR> On the other hand a process can also have several threads.

	Yes, but they are user-space threads (usually by a pthread or like
implementation).

WR> How does the scheduler schedule these threads in contrast to kernel
WR> threads or processes?

	The kernel does not recognize user-space threads. They are processes. The
thread sinchronization, mutual-exclusion and other thread stuff is done by
a user-space library. So, to the scheduler, they're a bunch of child
processes.

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