What is interrupt? How does interrupt work?


  • 1
    D

    Very basic but important questions.

    Reference answer: https://en.wikipedia.org/wiki/Interrupt


  • 5
    F

    Basically an interrupt is a signal to notify kernel(processor) that something needs to be handled as soon as possible. It's called interrupt because kernel(processor) may suspend what it is running to handle the interrupt event(by calling ISR) and then resume its execution.

    There are two types of interrupts: hardware interrupt(which caused by external device, like keyboard, mouse, disk, etc) and software interrupt(which caused by program, like system call, divide-by-zero)


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.