Sir,<br><br><div>Thank you very much for the explanation.</div><div><br><div class="gmail_quote">On Wed, Feb 16, 2011 at 8:20 PM, Bruce Rowen <span dir="ltr">&lt;<a href="mailto:browen@aoc.nrao.edu">browen@aoc.nrao.edu</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">When the interrupt line is asserted by the hardware device (could be<br>
a  peripheral, whatever) the interrupt controller decides how to pass<br>
this signal onto the processor. Some controllers will prioritize the<br>
interrupt based on the interrupt line number. For example, assume line<br>
#3 has interrupted. If line #4 then interrupts and #4 has higher<br>
priority, the service routine for interrupt line #3 will itself be<br>
interrupted. If a lower priority interrupt (say #2) occurs, then #3<br>
will continue until completion at which point #2 will be serviced.<br>
Note that this hardware prioritization is highly dependent on hardware<br>
and hardware setup. It could be such that an incoming interrupt with a<br>
lower priority than a currently servicing interrupt is simply ignored.<br></blockquote><div><br></div><div>If that is the case,</div><div>1) What happens in the case of x86?</div><div>2) Can we configure hardware (say, I/O APIC) so that alway higher priority interrupt&#39;s handler runs first?</div>

<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Mulyadi is correct in that once this hardware interrupt has been<br>
acknowledged at the controller and the (usually very short) interrupt<br>
service routine has been run, the prioritization of the rest of the<br>
interrupt handler is left to the Kernel. Typically in most systems the<br>
NMI has the highest priority and of course given its name, can never<br>
be ignored (masked).<br>
<br>
-Bruce<br>
<div><div></div><div class="h5"><br>
On Feb 16, 2011, at 1:54 AM, Mulyadi Santosa wrote:<br>
<br>
&gt; Hi :)<br>
&gt;<br>
&gt; On Tue, Feb 15, 2011 at 19:20, Darshan Ghumare<br>
&gt; &lt;<a href="mailto:darshan.ghumare@gmail.com">darshan.ghumare@gmail.com</a>&gt; wrote:<br>
&gt;&gt; IMHO, When the Processor is executing interrupt handler of IRQ4 then<br>
&gt;&gt; Processor is the one which pushes SS, SP, EFLAGS, CS  &amp; EIP  on<br>
&gt;&gt; stack (in<br>
&gt;&gt; this case this will all corresponds to interrupt handler of IRQ4) &amp;<br>
&gt;&gt; loads CS<br>
&gt;&gt; &amp; EIP corresponding to IRQ5.<br>
&gt;&gt; So, how come its depends on OS (kernel)? Please correct me if I am<br>
&gt;&gt; wrong.<br>
&gt;<br>
&gt; OK, to make it clear, I was talking about bottom half prioritizing<br>
&gt; .... the upper half is reacting whenever interrupt is coming (and it<br>
&gt; is not currently masked/disabled) AFAIK. Bottom half is the part where<br>
&gt; OS could do prioritizing if it indeed does so.<br>
&gt;<br>
&gt; The only &quot;prioritizing&quot; (if you take it as prioritizing) in interrupt<br>
&gt; is when it is fall into NMI (Non Maskable Interrupt). AFAIK, they<br>
&gt; could just kick others in queue, just like real time task kick regular<br>
&gt; process :) Uhm, maybe watchdog timer does same kind of interrupt<br>
&gt; too...<br>
&gt;<br>
&gt; Guys, CMIIW here...<br>
&gt;<br>
&gt; --<br>
&gt; regards,<br>
&gt;<br>
&gt; Mulyadi Santosa<br>
&gt; Freelance Linux trainer and consultant<br>
&gt;<br>
&gt; blog: <a href="http://the-hydra.blogspot.com" target="_blank">the-hydra.blogspot.com</a><br>
&gt; training: <a href="http://mulyaditraining.blogspot.com" target="_blank">mulyaditraining.blogspot.com</a><br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Kernelnewbies mailing list<br>
&gt; <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
&gt; <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</blockquote></div><br><br>
</div>