Kernel code interrupted by Timer

Peter Teoh htmldeveloper at gmail.com
Fri Feb 8 19:08:58 EST 2013


On Sat, Feb 9, 2013 at 1:08 AM, Gaurav Jain <gjainroorkee at gmail.com> wrote:

> What happens if the kernel executing in some process context (let's say
> executing a time-consuming syscall) gets interrupted by the Timer - which
> is apparently allowed in 2.6 onwards kernels.
>
> My understanding is that once the interrupt handler is done executing, we
> should switch back to where the kernel code was executing. Specifically,
> the interrupt handler for the Timer interrupt should not schedule some
> other task since that might leave kernel data in an inconsistent state -
> kernel didn't finish doing whatever it was doing when interrupted.
>

at the microscopic level, every stream of assembly instructions can always
be broken up and intercepted by interrupt, and possibly switched into
another stream of assembly instruction or logic, the maintenance of state
"consistency" is done via context switching.


> So, does the Timer interrupt handler include such a policy for the above
> case?
>
> --
> Gaurav Jain
>
>
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>


-- 
Regards,
Peter Teoh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130209/1d45012b/attachment.html 


More information about the Kernelnewbies mailing list