What is an Interrupt?
Download and listen anywhere
Download your favorite episodes and enjoy them, wherever you are! Sign up or log in now to access offline listening.
Description
Interrupt From Simple English Wikipedia, the free encyclopedia This chart shows what happens when an interrupt is called An interrupt is when a microprocessor does something that it is not...
show moreFrom Simple English Wikipedia, the free encyclopedia
This chart shows what happens when an interrupt is called
An interrupt is when a microprocessor does something that it is not told to do because of things that happen outside what the program is supposed to do. Interrupts happen most often because the processor gets a signal from hardware, but they can also come from software that is running along with the program. Among the many things can cause interrupts are pressing keys on a keyboard, the built-in timer going off, a data transfer taking place, or any other event that needs an action from the processor right away. Interrupts can happen at any time while the processor is running a program, no matter where in the program's source code it is.
How interrupts work
A hardware or software call for an interrupt (known as an interrupt request, or IRQ) is taken care of by an "interrupt handler" or "interrupt service routine" (ISR) in the processor. It puts what is it doing at the time onto a stack and then follows certain instructions that does a given task on behalf of the system, which does not have to be part of the program it does. Once it is done following the instructions, the ISR then takes back what it put on the stack and continues with what it was doing before the interrupt happened.
Many interrupt controllers from today's processors use an interrupt vector to sort interrupts based on where it came from, among other ways. The vector typically contains the code that has to be run when the interrupt happens. ISRs are generally responsible for dealing with, or "servicing", the interrupt, along with keeping itself in working order. [1]
Uses of interrupts
Triggering tasks at regular intervals
Servicing an external device that can happen at any time
Remove the need for synchronous polling
Triggering an operating system (OS) to take action
References
Massey, Russell (June 1, 2001). "Introduction to interrupts". Embedded.
Interrupt. (2021, May 29). Wikipedia, The Free Encyclopedia. Retrieved 18:51, October 14, 2022 from https://simple.wikipedia.org/w/index.php?title=Interrupt&oldid=7569672.
Information
Author | Miranda Casturo |
Organization | Miranda Casturo |
Website | - |
Tags |
Copyright 2024 - Spreaker Inc. an iHeartMedia Company