Skip to main content

Difference between Hardware Interrupt and Software Interrupt

Difference between Hardware Interrupt and Software Interrupt
An interrupt is a special signal that causes the computer’s central processing unit to suspend what it is doing and transfers its control to a special program called an interrupt handler. The responsibility of an interrupt handler is to determine what caused the interrupt, service the interrupt and then return the control to the point from where the interrupt was caused. The difference between hardware interrupt and software interrupt is as below:

Hardware Interrupt: This interrupt is caused by some external device such as the request to start an I/O or occurrence of a hardware failure.

Software Interrupt: This interrupt can be invoked with the help of INT instruction. A programmer triggered this event that immediately stops the execution of the program and passes execution over to the INT handler. The INT handler is usually a part of the operating system and determines the action to be taken e.g. output to the screen, execute file etc.
Thus, a software interrupt as it names suggests is driven by a software instruction and a hardware interrupt is the result of external causes.

Comments

Popular posts from this blog

CAN INTERVIEW QUESTIONS

Qualifiers and Modifier in C

RTOS Real time operating system interview questions

CAN INTERVIEW QUESTIONS 2

What is UDS protocol

Memory mapping in c

TOP IOT PLATFORMS