Answer the question
In order to leave comments, you need to log in
How do interrupts work?
Please explain on your fingers how software and hardware interrupts work
Answer the question
In order to leave comments, you need to log in
Software - just a call to a subroutine whose address is recorded in the interrupt vector table, only the stack is formed in a slightly different way.
Hardware is implementation dependent. On x86, EMNIP, a separate controller is used. The signal received from the device latches the corresponding trigger, the processor at a certain stage of command execution checks the status of all triggers in order of priority. When a signal is detected, the desired address is taken from the same interrupt table and the subroutine at this address is called. The interrupt routine must reset the flip-flop before it terminates so that the next signal that arrives can cock it again.
Very simple. Just imagine, you are a processor, sitting at home, minding your own business. Suddenly, bam! interruption - your son's class teacher calls you and asks you to go to the director of the school tomorrow. We have to put this task in the queue for execution :-)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question