Re: Question about kernel preemption

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

 



On Fri, Aug 14, 2009 at 12:15 PM, Michael
Blizek<michi1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> Hi!
>
> On 00:08 Fri 14 Aug     , Mohammed Gamal wrote:
>
> ...
>
>> As far as I understood, Michi's answer explains why and when the
>> kernel *can* get preempted, however what I really want to know is when
>> and where kernel preemption is *triggered*. Please correct me if I did
>> misunderstand anything.
>
> It is triggered by the timer interrupt. This is an interrupt which fires
> periodically on configureable intervals. It does not only preempt the kernel,
> but user space processes as well. If it fires, the kernel will enter the
> scheduler and decide what to run next.

In addition, IIRC:
- every return from hard interrupt, either back to kernel space (if
kernel level preemption is enabled) or to user space triggers
preemption checking.

- going back from kernel space to user space triggers preemption checking.


-- 
regards,

Mulyadi Santosa
Freelance Linux trainer
blog: the-hydra.blogspot.com

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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