Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Interrupt
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Typical uses== Interrupts are commonly used to service hardware timers, transfer data to and from storage (e.g., disk I/O) and communication interfaces (e.g., [[UART]], [[Ethernet]]), handle keyboard and mouse events, and to respond to any other time-sensitive events as required by the application system. Non-maskable interrupts are typically used to respond to high-priority requests such as watchdog timer timeouts, power-down signals and [[Exception handling|traps]]. Hardware timers are often used to generate periodic interrupts. In some applications, such interrupts are counted by the interrupt handler to keep track of absolute or elapsed time, or used by the OS task [[Scheduling (computing)|scheduler]] to manage execution of running [[process (computing)|processes]], or both. Periodic interrupts are also commonly used to invoke sampling from input devices such as [[analog-to-digital converter]]s, [[incremental encoder interface]]s, and [[GPIO]] inputs, and to program output devices such as [[digital-to-analog converter]]s, [[motor controller]]s, and GPIO outputs. {{anchor|Disk interrupt}}A disk interrupt signals the completion of a data transfer from or to the disk peripheral; this may cause a process to run which is waiting to read or write. A power-off interrupt predicts imminent loss of power, allowing the computer to perform an orderly shut-down while there still remains enough power to do so. Keyboard interrupts typically cause [[keystrokes]] to be buffered so as to implement [[typeahead]]. Interrupts are sometimes used to emulate instructions which are unimplemented on some computers in a product family.<ref>{{cite book | title = IBM System/360 Operating System - Guide to Model 91 Support | id = C28-6666-0 | section = DECIMAL SIMULATOR | section-url = http://bitsavers.org/pdf/ibm/360/os/C28-6666-0_360-91_OSsupport_Nov67.pdf#page=11 | pages = 11β12 | url = http://bitsavers.org/pdf/ibm/360/os/C28-6666-0_360-91_OSsupport_Nov67.pdf | series = Systems Reference Library | access-date = September 2, 2024 }} </ref><ref>{{cite web|last1=Thusoo|first1=Shalesh |display-authors=etal |title=Patent US 5632028 A|url=https://patents.google.com/patent/US5632028|website=Google Patents|access-date=Aug 13, 2017}}</ref> For example [[floating point]] instructions may be implemented in hardware on some systems and emulated on lower-cost systems. In the latter case, execution of an unimplemented floating point instruction will cause an "illegal instruction" exception interrupt. The interrupt handler will implement the floating point function in software and then return to the interrupted program as if the hardware-implemented instruction had been executed.<ref>{{cite book|last1=Altera Corporation|title=Nios II Processor Reference|date=2009|page=4|url=https://www.altera.com/content/dam/altera-www/global/en_US/pdfs/literature/hb/nios2/n2cpu_nii51002.pdf|access-date=Aug 13, 2017}}</ref> This provides application software portability across the entire line. Interrupts are similar to [[Signal (IPC)|signals]], the difference being that signals are used for [[inter-process communication]] (IPC), mediated by the kernel (possibly via system calls) and handled by processes, while interrupts are mediated by the processor and handled by the [[Kernel (operating system)|kernel]]. The kernel may pass an interrupt as a signal to the process that caused it (typical examples are [[SIGSEGV]], [[SIGBUS]], [[SIGILL]] and [[SIGFPE]]).
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)