Advertisement
Guest User

Untitled

a guest
Jan 21st, 2020
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. Software interrupts are used to handle errors and exceptions that occur while a program is running. For example, if a program expects a variable to be a valid number, but the value is null, an interrupt may be generated to prevent the program from crashing. It allows the program to change course and handle the error before continuing. Similarly, an interrupt can be used to break an infinite loop, which could create a memory leak or cause a program to be unresponsive.
  2.  
  3. Both hardware and software interrupts are processed by an interrupt handler, also called an interrupt service routine, or ISR. When a program receives an interrupt request, the ISR handles the event and the program resumes. Since interrupts are often as brief as a keystroke or mouse click, they are often processed in less than a millisecond.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement