It was for Linux. All the interrupt run
in the context of the currently running process. Now say process A is in wait
queue (for some IO ) and B is currently running. Now B is interrupted and the ISR runs in the context of
process B. the wake_up_process function if A was waiting on it,
which will set the resched_flag =1
if if (goodness(B, A) >
goodness(B, B)) B->need_resched = 1;
Now the flag is checked in
ret_from_int and a context switch is made then A will start executing. ISR uses
the process's kernel stack during excecution ,this means that the ISR runs the
context for the process. Check this url for more info http://www.oreilly.com/catalog/linuxkernel/chapter/ch10.html Thank
you,
Rahul
[Sonawane, Rahul
(Rahul)] -----Original Message----- From:
Anjaneyulu [mailto:anjaneyulu@mistralsoftware.com] Sent: Thursday,
October 24, 2002 11:30 AM To: Sonawane, Rahul
(Rahul) Subject: Re: Interrupt Handling and
Scheduler
Hi,
The explanation given by you is for RT-Linux OR
linux!!!! I am interested in non-preemptive linux kernel.
You have explained wrt Timer interrupt. Is it the
same behavior with other external interrupts( Ex: PCI device)????
In the timer interrupt itself, What does "ISR
executes in the current process context" mean??? What is the counter's initial
value???
If the interrupts are coming at very high
frequency, I would like to know whether the process pending in kernel
will ever get the chance to execute.
i.e. when schedule is called does it guarentee
that the process will get the chance.
Regards,
Anj
----- Original Message -----
Sent: Thursday, October 24, 2002 10:58
AM
Subject: RE: Interrupt Handling and
Scheduler
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????
Thanks in advance.
Regards,
Anj
|