I’ve seen several question on here about exceptions, and some of them hint at interrupts as exceptions, but none make the connection clear.
-
What is an interrupt?
-
What is an exception? (please explain what exceptions are for each language you know, as there are some differences)
-
When is an exception an interrupt and vice-versa?
An interupt is a CPU signal generated by hardware, or specific CPU instructions. These cause interupt handlers to be executed. Things such as I/O signals from I/O hardware generate interupts.
An exception can be thought of as a software-version of an interupt, that only affects its process.
I’m not sure on the exact details, but an exception could be implemented by an interupt.