Re: preemption

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

 



Hi...

2009/6/24 Kostya B <bkostya@xxxxxxxxxxx>:
>
>
>  Dear list,
>
>  Please help me to analyze the following scenario:
>
>  By having a userspace process 'A' executing a system call.
>  Hardware interrupt happens. Do you think on exit from interrupt (irq_exit)
>  the context switch could take place?
Yes it could, depending on the preemption model you pick...see below....

> Let's assume no softirq work is pending.
>
>  (a) kernel is not preemptive

then it would stay in the current kernel code path, which is executing
the syscall on behalf of running task.

>  (b) kernel is preemptive

What I am quite sure here is, in full preemptive kernel, after
returning from interrupt handling, scheduler is allowed to pick new
task to be executed. So, let's say scheduler has pick new task
according to certain rules, context switch will happen.

For voluntary preemption, perhaps you need to check the code by your
own. In my point of view, after reading http://lwn.net/Articles/95334/
(probably not so relevant anymore), I have impression rescheduling
also happen after returning from interrupt handler.

>  (c) with RT patch

I have no hands on experience about RT patch. Also you need to
specificly define whether you refer to hard or soft RT.

I think in both RT style, the preemption might happen after returning
from the interrupt. By doing that, scheduler might be able to pick the
job that almost meet its deadline.

regards,

Mulyadi.

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