Re: Scheduler - kernel threads - threads - processes

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

 



On Friday 23 August 2002 05:09 am, Wank Rainer wrote:
> Hi,
>
> the Linux scheduler has three policies SCHED_FIFO, SCHED_RR and
> SCHED_OTHER. SCHED_FIFO and SCHED_RR are for realtime requirements.
> The kernel is not preemptive. That means that a process running in kernel
> mode can not be preempted.
>
> There are also kernel threads, like [kswapd].  Does a kernel thread have a
> priority? How does the scheduler schedule kernel threads?

All processes on the system are scheduled exactly the same way. This means 
that a process with a priority higher than a kernel daemon will have 
precedence over the daemon. I've tried this.  I ran a fifo thread the 
monopolized the CPU. I tried to connect a USB device but the khubd could not 
run. There are some daemons that have a real-time priority however, like 
certain sound daemons: artsd.

Under the O(1) scheduler, there has been a little change that would allow 
certain kernel-created threads the obtain priorities that are not available 
to any other threads. However, last time I checked, this has not been put to 
use, but the mechanism is there. 

Secondly, a thread can be preempted in kernel mode from kernel 2.5.x and 
onward, but only in certain areas of the kernel where preemption is not 
enabled.

>
> On the other hand a process can also have several threads.
> How does the scheduler schedule these threads in contrast to kernel threads
> or processes?
>
> Thanx!
>
> Rainer
--
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