Re: Interrupt Handling and Scheduler

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

 



On Thursday 24 October 2002 12:24 am, Anjaneyulu wrote:
> Hi,
> I have a doubt about the interrupt handling and the scheduling.
> When an ISR is being executed, that particular interrupt is disable.
> Suppose the ISR is waking up a process using wake_up_process().
> Before that particular process is able to execute any statement, if another
> interrupt comes and hence ISR will again execute.
>
> My question is if the interrupts are coming at very high frequency, the
> process will never get the chance to execute. Is it right???
>
> Please tell me the scheduler reaction to an interrupt. What happens to the
> current process????
>



On Thursday 24 October 2002 12:24 am, you wrote:
> Hi,
> I have a doubt about the interrupt handling and the scheduling.
> When an ISR is being executed, that particular interrupt is disable.
> Suppose the ISR is waking up a process using wake_up_process().
> Before that particular process is able to execute any statement, if another
> interrupt comes and hence ISR will again execute.
>
> My question is if the interrupts are coming at very high frequency, the
> process will never get the chance to execute. Is it right???
>
> Please tell me the scheduler reaction to an interrupt. What happens to the
> current process????
>

If there is only one cpu, you are right. If interrupts happened at a high 
enough frequency, they could stop the current process from executing anything 
at all because the ISR cannot share the same CPU with the current process. 
That is why interrupts MUST return quickly. Any interrupt processing that can 
be deferred until later should be executed in "soft-irqs" and "bottom-halves" 
at a later time.

Soft-Irqs and bottom-halves are ways of scheduling non-essential interrupt 
processing to happen at a later time. 

Secondly, a process woken up by a ISR will never be scheduled to run until 
the ISR returns. Therefore, calling wake_up_process() has no effect other 
than to place the sleeping process back onto the run queue (the list of 
runnable processes) and set the reschedule bit that reminds the OS that it 
needs to call schedule() as soon as possible. When the ISR exits, the OS will 
call schedule().  


Anton



> Thanks in advance.
>
> Regards,
> Anj





> Thanks in advance.
>
> Regards,
> Anj
--
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